diff options
author | jhb <jhb@FreeBSD.org> | 2004-06-23 17:59:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-06-23 17:59:01 +0000 |
commit | 8371bbfa53f254227d77ff45cbbbff7fc59eed1b (patch) | |
tree | a34e15e64f3d8628ff066e341179d19c282c9d92 | |
parent | 33bd77e91ba8c996ff48acf2fff2976e1154923a (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/amd64/amd64/bios.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/bios.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c index 5109e4d..3bee94f 100644 --- a/sys/amd64/amd64/bios.c +++ b/sys/amd64/amd64/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 */ 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 */ |