diff options
author | dfr <dfr@FreeBSD.org> | 1999-10-12 21:35:51 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-10-12 21:35:51 +0000 |
commit | 229cdb91443142db582b7e32098f62f6446c3f3a (patch) | |
tree | 8eaacbe4f132a095dfe6be00173bd751633a034d /sys/isa/isahint.c | |
parent | b203e98b2b9de39cedbf62c7eb859ade4d60e6bc (diff) | |
download | FreeBSD-src-229cdb91443142db582b7e32098f62f6446c3f3a.zip FreeBSD-src-229cdb91443142db582b7e32098f62f6446c3f3a.tar.gz |
* Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
layout of ivars.
* Move set_resource, get_resource and delete_resource from
isa_if.m to bus_if.m.
* Simplify driver code by providing wrappers to those methods:
bus_set_resource(dev, type, rid, start, count);
bus_get_resource(dev, type, rid, startp, countp);
bus_get_resource_start(dev, type, rid);
bus_get_resource_count(dev, type, rid);
bus_delete_resource(dev, type, rid);
* Delete isa_get_rsrc and use bus_get_resource_start instead.
* Fix a stupid typo in isa_alloc_resource reported by Takahashi
Yoshihiro <nyan@FreeBSD.org>.
* Print a diagnostic message if we can't assign resources to a PnP
device.
* Change device_print_prettyname() so that it doesn't print
"(no driver assigned)-1" for anonymous devices.
Diffstat (limited to 'sys/isa/isahint.c')
-rw-r--r-- | sys/isa/isahint.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/isa/isahint.c b/sys/isa/isahint.c index a8a5c8f..f02864f 100644 --- a/sys/isa/isahint.c +++ b/sys/isa/isahint.c @@ -59,21 +59,19 @@ isahint_add_device(device_t parent, const char *name, int unit) count = 0; if ((resource_int_value(name, unit, "port", &start) == 0 && start > 0) || (resource_int_value(name, unit, "portsize", &count) == 0 && count > 0)) - ISA_SET_RESOURCE(parent, child, SYS_RES_IOPORT, 0, - start, count); + bus_set_resource(child, SYS_RES_IOPORT, 0, start, count); start = 0; count = 0; if ((resource_int_value(name, unit, "maddr", &start) == 0 && start > 0) || (resource_int_value(name, unit, "msize", &count) == 0 && count > 0)) - ISA_SET_RESOURCE(parent, child, SYS_RES_MEMORY, 0, - start, count); + bus_set_resource(child, SYS_RES_MEMORY, 0, start, count); if (resource_int_value(name, unit, "irq", &start) == 0 && start > 0) - ISA_SET_RESOURCE(parent, child, SYS_RES_IRQ, 0, start, 1); + bus_set_resource(child, SYS_RES_IRQ, 0, start, 1); if (resource_int_value(name, unit, "drq", &start) == 0 && start > 0) - ISA_SET_RESOURCE(parent, child, SYS_RES_DRQ, 0, start, 1); + bus_set_resource(child, SYS_RES_DRQ, 0, start, 1); if (resource_int_value(name, unit, "flags", &t) == 0) device_set_flags(child, t); |