summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/atkbdc/atkbdc_isa.c2
-rw-r--r--sys/dev/atkbdc/atkbdc_subr.c2
-rw-r--r--sys/dev/fdc/fdc.c2
-rw-r--r--sys/dev/sio/sio_pci.c4
-rw-r--r--sys/i386/bios/apm.c10
-rw-r--r--sys/i386/isa/npx.c3
-rw-r--r--sys/isa/atkbdc_isa.c2
-rw-r--r--sys/isa/isahint.c5
-rw-r--r--sys/pc98/cbus/fdc.c2
-rw-r--r--sys/pc98/pc98/fd.c2
10 files changed, 3 insertions, 31 deletions
diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c
index 153ed9f..d0476a3 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 153ed9f..d0476a3 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 8afaadd..c17e5f2 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 efd32ba..d79f12a 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 4aeedd1..dd5f635 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 3d625ba..6b27424 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 153ed9f..d0476a3 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 dd04967..32833f1 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 616fd9c..6dc029a 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 616fd9c..6dc029a 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);
OpenPOWER on IntegriCloud