summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/fdc.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-07-02 16:09:02 +0000
committerjhb <jhb@FreeBSD.org>2003-07-02 16:09:02 +0000
commit17958a749f60b50092d0ae5d6171bdc924cbed02 (patch)
tree24843831a3541cd5733aaad746e1a57206e1e21f /sys/pc98/cbus/fdc.c
parentea0bd1523805444400e26e89587d5f1a933ff7dd (diff)
downloadFreeBSD-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/pc98/cbus/fdc.c')
-rw-r--r--sys/pc98/cbus/fdc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c
index a940ccb..04c46e0 100644
--- a/sys/pc98/cbus/fdc.c
+++ b/sys/pc98/cbus/fdc.c
@@ -1275,7 +1275,7 @@ fdc_detach(device_t dev)
static void
fdc_add_child(device_t dev, const char *name, int unit)
{
- int disabled, flags;
+ int flags;
struct fdc_ivars *ivar;
device_t child;
@@ -1292,8 +1292,7 @@ fdc_add_child(device_t dev, const char *name, int unit)
device_set_ivars(child, ivar);
if (resource_int_value(name, unit, "flags", &flags) == 0)
device_set_flags(child, flags);
- if (resource_int_value(name, unit, "disabled", &disabled) == 0
- && disabled != 0)
+ if (resource_disabled(name, unit))
device_disable(child);
}
OpenPOWER on IntegriCloud