diff options
author | Nate Lawson <njl@FreeBSD.org> | 2004-10-14 22:21:59 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2004-10-14 22:21:59 +0000 |
commit | e5979322ba19bf6972057bbd2020b03d31f0120e (patch) | |
tree | 0f9116b3f1c78782e732cdc488fb4b329d06e0b3 | |
parent | d749cd6f7c530ad3e705436f0221a8435d69620e (diff) | |
download | src-e5979322ba19bf6972057bbd2020b03d31f0120e.tar.gz src-e5979322ba19bf6972057bbd2020b03d31f0120e.zip |
Remove local hacks to set flags now that the device probe does this for us.
Tested on every device except sio_pci and the pc98 fd.c. Perhaps something
similar should be done for the "disabled" hints also.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=136520
-rw-r--r-- | sys/dev/atkbdc/atkbdc_isa.c | 2 | ||||
-rw-r--r-- | sys/dev/atkbdc/atkbdc_subr.c | 2 | ||||
-rw-r--r-- | sys/dev/fdc/fdc.c | 2 | ||||
-rw-r--r-- | sys/dev/sio/sio_pci.c | 4 | ||||
-rw-r--r-- | sys/i386/bios/apm.c | 10 | ||||
-rw-r--r-- | sys/i386/isa/npx.c | 3 | ||||
-rw-r--r-- | sys/isa/atkbdc_isa.c | 2 | ||||
-rw-r--r-- | sys/isa/isahint.c | 5 | ||||
-rw-r--r-- | sys/pc98/cbus/fdc.c | 2 | ||||
-rw-r--r-- | sys/pc98/pc98/fd.c | 2 |
10 files changed, 3 insertions, 31 deletions
diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index 153ed9f9d8e4..d0476a315d44 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -252,8 +252,6 @@ atkbdc_add_child(device_t bus, int order, char *name, int unit) resource_list_add(&ivar->resources, SYS_RES_IRQ, ivar->rid, t, t, 1); - if (resource_int_value(name, unit, "flags", &t) == 0) - device_set_flags(child, t); if (resource_disabled(name, unit)) device_disable(child); diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c index 153ed9f9d8e4..d0476a315d44 100644 --- a/sys/dev/atkbdc/atkbdc_subr.c +++ b/sys/dev/atkbdc/atkbdc_subr.c @@ -252,8 +252,6 @@ atkbdc_add_child(device_t bus, int order, char *name, int unit) resource_list_add(&ivar->resources, SYS_RES_IRQ, ivar->rid, t, t, 1); - if (resource_int_value(name, unit, "flags", &t) == 0) - device_set_flags(child, t); if (resource_disabled(name, unit)) device_disable(child); diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 8afaadd79a28..c17e5f22a46c 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -1697,8 +1697,6 @@ fdc_add_child(device_t dev, const char *name, int unit) device_set_ivars(child, ivar); ivar->fdunit = unit; ivar->fdtype = FDT_NONE; - if (resource_int_value(name, unit, "flags", &flags) == 0) - device_set_flags(child, flags); if (resource_disabled(name, unit)) device_disable(child); return (child); diff --git a/sys/dev/sio/sio_pci.c b/sys/dev/sio/sio_pci.c index efd32baabd1d..d79f12a138d3 100644 --- a/sys/dev/sio/sio_pci.c +++ b/sys/dev/sio/sio_pci.c @@ -96,7 +96,6 @@ sio_pci_attach(dev) { u_int32_t type; struct pci_ids *id; - int flags; type = pci_get_devid(dev); id = pci_ids; @@ -105,9 +104,6 @@ sio_pci_attach(dev) if (id->desc == NULL) return (ENXIO); sio_pci_kludge_unit(dev); - if (resource_int_value("sio", device_get_unit(dev), "flags", &flags) - == 0) - device_set_flags(dev, flags); return (sioattach(dev, id->rid, 0UL)); } diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 4aeedd13d654..dd5f6356dc04 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -864,7 +864,6 @@ apm_probe(device_t dev) #define APM_KERNBASE KERNBASE struct vm86frame vmf; struct apm_softc *sc = &apm_softc; - int flags; #ifdef PC98 int rid; #endif @@ -881,9 +880,6 @@ apm_probe(device_t dev) return ENXIO; } - if (resource_int_value("apm", 0, "flags", &flags) != 0) - flags = 0; - bzero(&vmf, sizeof(struct vm86frame)); /* safety */ bzero(&apm_softc, sizeof(apm_softc)); vmf.vmf_ah = APM_BIOS; @@ -1123,16 +1119,12 @@ static int apm_attach(device_t dev) { struct apm_softc *sc = &apm_softc; - int flags; int drv_version; #ifdef PC98 int rid; #endif - if (resource_int_value("apm", 0, "flags", &flags) != 0) - flags = 0; - - if (flags & 0x20) + if (device_get_flags(dev) & 0x20) statclock_disable = 1; sc->initialized = 0; diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 3d625baef4db..6b274242d0d3 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -421,8 +421,7 @@ npx_attach(dev) int flags; register_t s; - if (resource_int_value("npx", 0, "flags", &flags) != 0) - flags = 0; + flags = device_get_flags(dev); if (flags) device_printf(dev, "flags 0x%x ", flags); diff --git a/sys/isa/atkbdc_isa.c b/sys/isa/atkbdc_isa.c index 153ed9f9d8e4..d0476a315d44 100644 --- a/sys/isa/atkbdc_isa.c +++ b/sys/isa/atkbdc_isa.c @@ -252,8 +252,6 @@ atkbdc_add_child(device_t bus, int order, char *name, int unit) resource_list_add(&ivar->resources, SYS_RES_IRQ, ivar->rid, t, t, 1); - if (resource_int_value(name, unit, "flags", &t) == 0) - device_set_flags(child, t); if (resource_disabled(name, unit)) device_disable(child); diff --git a/sys/isa/isahint.c b/sys/isa/isahint.c index dd0496760536..32833f159229 100644 --- a/sys/isa/isahint.c +++ b/sys/isa/isahint.c @@ -39,7 +39,7 @@ static void isahint_add_device(device_t parent, const char *name, int unit) { device_t child; - int sensitive, start, count, t; + int sensitive, start, count; int order; /* device-specific flag overrides any wildcard */ @@ -76,9 +76,6 @@ isahint_add_device(device_t parent, const char *name, int unit) if (resource_int_value(name, unit, "drq", &start) == 0 && start >= 0) bus_set_resource(child, SYS_RES_DRQ, 0, start, 1); - if (resource_int_value(name, unit, "flags", &t) == 0) - device_set_flags(child, t); - if (resource_disabled(name, unit)) device_disable(child); } diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index 616fd9c492dc..6dc029a86d68 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -914,8 +914,6 @@ fdc_add_child(device_t dev, const char *name, int unit) device_set_ivars(child, ivar); ivar->fdunit = unit; ivar->fdtype = FDT_NONE; - if (resource_int_value(name, unit, "flags", &flags) == 0) - device_set_flags(child, flags); if (resource_disabled(name, unit)) device_disable(child); return (child); diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index 616fd9c492dc..6dc029a86d68 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -914,8 +914,6 @@ fdc_add_child(device_t dev, const char *name, int unit) device_set_ivars(child, ivar); ivar->fdunit = unit; ivar->fdtype = FDT_NONE; - if (resource_int_value(name, unit, "flags", &flags) == 0) - device_set_flags(child, flags); if (resource_disabled(name, unit)) device_disable(child); return (child); |