diff options
author | jhb <jhb@FreeBSD.org> | 2003-07-02 16:09:02 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-07-02 16:09:02 +0000 |
commit | 17958a749f60b50092d0ae5d6171bdc924cbed02 (patch) | |
tree | 24843831a3541cd5733aaad746e1a57206e1e21f /sys/dev/acpica | |
parent | ea0bd1523805444400e26e89587d5f1a933ff7dd (diff) | |
download | FreeBSD-src-17958a749f60b50092d0ae5d6171bdc924cbed02.zip FreeBSD-src-17958a749f60b50092d0ae5d6171bdc924cbed02.tar.gz |
- Use the new resource_disabled() helper function to see if devices are
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
see if the device is disabled in the identify routine instead of in the
probe routine. This way if the device is disabled it is never created.
Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled". If this is a big problem, resource_disabled() can always be
changed to honor both names.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r-- | sys/dev/acpica/acpi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index c5f920e..4d4b221 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -215,8 +215,7 @@ acpi_identify(driver_t *driver, device_t parent) /* * Check that we haven't been disabled with a hint. */ - if (!resource_int_value("acpi", 0, "disabled", &error) && - (error != 0)) + if (resource_disabled("acpi", 0)) return_VOID; /* @@ -2175,13 +2174,11 @@ out: static void acpi_pm_register(void *arg) { - int error; if (!cold) return; - if (!resource_int_value("acpi", 0, "disabled", &error) && - (error != 0)) + if (resource_disabled("acpi", 0)) return; power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL); |