summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-06-23 17:59:01 +0000
committerjhb <jhb@FreeBSD.org>2004-06-23 17:59:01 +0000
commit8371bbfa53f254227d77ff45cbbbff7fc59eed1b (patch)
treea34e15e64f3d8628ff066e341179d19c282c9d92 /sys/i386
parent33bd77e91ba8c996ff48acf2fff2976e1154923a (diff)
downloadFreeBSD-src-8371bbfa53f254227d77ff45cbbbff7fc59eed1b.zip
FreeBSD-src-8371bbfa53f254227d77ff45cbbbff7fc59eed1b.tar.gz
Fetch the actual acpi0 device_t and use device_is_attached() to see if
it's alive rather than trying to fetch its softc pointer via its devclass. Glanced at by: imp, njl
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/bios.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c
index 5109e4d..3bee94f 100644
--- a/sys/i386/i386/bios.c
+++ b/sys/i386/i386/bios.c
@@ -555,8 +555,9 @@ pnpbios_identify(driver_t *driver, device_t parent)
if (pt == NULL)
return;
- /* ACPI already active */
- if (devclass_get_softc(devclass_find("acpi"), 0) != NULL)
+ /* Check to see if ACPI is already active. */
+ dev = devclass_get_device(devclass_find("acpi"), 0);
+ if (dev != NULL && device_is_attached(dev))
return;
/* get count of PnP devices */
OpenPOWER on IntegriCloud