summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-06-27 13:04:19 +0000
committerimp <imp@FreeBSD.org>2004-06-27 13:04:19 +0000
commite76d542a9aac0adde8065139238ebaec851ba29a (patch)
tree5e160cc258cf2ec27cea65296afad413aa79f759 /sys/dev/acpica
parent8395a82f93dfbb89b907d5d2437f248f1f0c3503 (diff)
downloadFreeBSD-src-e76d542a9aac0adde8065139238ebaec851ba29a.zip
FreeBSD-src-e76d542a9aac0adde8065139238ebaec851ba29a.tar.gz
MFp4: Set the bus handle to the bus handle of the resource, not the
starting value. This is more pedantically correct (since the handle isn't always identical to the start of the resource) and also doesn't access the innards of struct resource direct (which I forbid in my tree). We need to do this for all resource types, not just ioport. Reviewed by: njl
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 7b79995..286d870 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -891,10 +891,9 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid,
if (res == NULL)
return (NULL);
- /* Copy the bus tag from the pre-allocated resource. */
+ /* Copy the bus tag and handle from the pre-allocated resource. */
rman_set_bustag(res, rman_get_bustag(rle->res));
- if (type == SYS_RES_IOPORT)
- rman_set_bushandle(res, res->r_start);
+ rman_set_bushandle(res, rman_get_bushandle(res));
/* If requested, activate the resource using the parent's method. */
if (flags & RF_ACTIVE)
OpenPOWER on IntegriCloud