summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_pcib_acpi.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-09-22 15:46:16 +0000
committerjhb <jhb@FreeBSD.org>2004-09-22 15:46:16 +0000
commitcf1b8fbca5432f624ea9a8b572cc5ba250278fa5 (patch)
tree5929701468e47aab4540fb10f7ae335e5bd17547 /sys/dev/acpica/acpi_pcib_acpi.c
parent39563036071c35de79aa935b7bdfc209277f3afb (diff)
downloadFreeBSD-src-cf1b8fbca5432f624ea9a8b572cc5ba250278fa5.zip
FreeBSD-src-cf1b8fbca5432f624ea9a8b572cc5ba250278fa5.tar.gz
Add a couple of macros to extract the PCI slot (device) and function from
an ACPI _ADR value and use that rather than inlining the same shifts and masks everywhere.
Diffstat (limited to 'sys/dev/acpica/acpi_pcib_acpi.c')
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index d37db32..350bb89 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -188,8 +188,8 @@ acpi_pcib_acpi_attach(device_t dev)
device_printf(dev, "couldn't find _ADR\n");
} else {
/* XXX: We assume bus 0. */
- slot = addr >> 16;
- func = addr & 0xffff;
+ slot = ACPI_ADR_PCI_SLOT(addr);
+ func = ACPI_ADR_PCI_FUNC(addr);
if (bootverbose)
device_printf(dev, "reading config registers from 0:%d:%d\n",
slot, func);
OpenPOWER on IntegriCloud