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:
John Baldwin 2004-06-23 17:59:01 +00:00
parent 14b3b2933d
commit a7cd01df0e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130983
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 */