From a7cd01df0e5068b7955977172719622f3d55433f Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 23 Jun 2004 17:59:01 +0000 Subject: [PATCH] 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 --- sys/amd64/amd64/bios.c | 5 +++-- 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 5109e4d8a1d4..3bee94fdd5df 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 5109e4d8a1d4..3bee94fdd5df 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 */