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
This commit is contained in:
jhb 2004-06-23 17:59:01 +00:00
parent 33bd77e91b
commit 8371bbfa53
2 changed files with 6 additions and 4 deletions

View File

@ -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 */

View File

@ -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 */