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/atkbdc | |
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/atkbdc')
-rw-r--r-- | sys/dev/atkbdc/atkbd.c | 3 | ||||
-rw-r--r-- | sys/dev/atkbdc/atkbdc_isa.c | 2 | ||||
-rw-r--r-- | sys/dev/atkbdc/atkbdc_subr.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index edf6489..569f14b 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -277,8 +277,7 @@ atkbd_configure(int flags) atkbdc_configure(); /* if the driver is disabled, unregister the keyboard if any */ - if ((resource_int_value("atkbd", ATKBD_DEFAULT, "disabled", &i) == 0) - && i != 0) { + if (resource_disabled("atkbd", ATKBD_DEFAULT)) { i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT); if (i >= 0) { kbd = kbd_get_keyboard(i); diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index 7dbe02a..2618adf 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -255,7 +255,7 @@ atkbdc_add_child(device_t bus, int order, char *name, int unit) if (resource_int_value(name, unit, "flags", &t) == 0) device_set_flags(child, t); - if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0) + if (resource_disabled(name, unit)) device_disable(child); device_set_ivars(child, ivar); diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c index 7dbe02a..2618adf 100644 --- a/sys/dev/atkbdc/atkbdc_subr.c +++ b/sys/dev/atkbdc/atkbdc_subr.c @@ -255,7 +255,7 @@ atkbdc_add_child(device_t bus, int order, char *name, int unit) if (resource_int_value(name, unit, "flags", &t) == 0) device_set_flags(child, t); - if (resource_int_value(name, unit, "disabled", &t) == 0 && t != 0) + if (resource_disabled(name, unit)) device_disable(child); device_set_ivars(child, ivar); |