diff options
author | mdodd <mdodd@FreeBSD.org> | 2000-10-18 00:09:26 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2000-10-18 00:09:26 +0000 |
commit | 24266e7d45309efd1c81c7333b14496258e6b81b (patch) | |
tree | d18a2adbe56101a453d116149ba7e431e628dc4a /sys/dev/pcic | |
parent | 81e1a4e6535529c973204e2f279d1f16fea83879 (diff) | |
download | FreeBSD-src-24266e7d45309efd1c81c7333b14496258e6b81b.zip FreeBSD-src-24266e7d45309efd1c81c7333b14496258e6b81b.tar.gz |
Use appropriate resource management accessors instead of directly
referencing structure members.
Use rman_get_size() instead of end - start + 1.
Diffstat (limited to 'sys/dev/pcic')
-rw-r--r-- | sys/dev/pcic/i82365.c | 4 | ||||
-rw-r--r-- | sys/dev/pcic/i82365_isa.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pcic/i82365.c b/sys/dev/pcic/i82365.c index 1abdd7b..59df77a 100644 --- a/sys/dev/pcic/i82365.c +++ b/sys/dev/pcic/i82365.c @@ -1307,7 +1307,7 @@ pcic_activate_resource(device_t dev, device_t child, int type, int rid, bus_addr_t off; struct pcic_handle *h = pcic_get_handle(dev, child); - sz = rman_get_end(r) - rman_get_start(r) + 1; + sz = rman_get_size(r); switch (type) { case SYS_RES_IOPORT: win = rid; @@ -1416,7 +1416,7 @@ pcic_alloc_resource(device_t dev, device_t child, int type, int *rid, count, flags); if (r == NULL) return r; - sz = rman_get_end(r) - rman_get_start(r) + 1; + sz = rman_get_size(r); switch (type) { case SYS_RES_IOPORT: err = pcic_chip_io_alloc(h, rman_get_start(r), sz, 0, diff --git a/sys/dev/pcic/i82365_isa.c b/sys/dev/pcic/i82365_isa.c index 800b848..e71b87f 100644 --- a/sys/dev/pcic/i82365_isa.c +++ b/sys/dev/pcic/i82365_isa.c @@ -134,7 +134,7 @@ pcic_isa_bus_width_probe (device_t dev) struct resource *r; base = rman_get_start(sc->port_res); - length = rman_get_end(sc->port_res) - rman_get_end(sc->port_res) + 1; + length = rman_get_size(sc->port_res); iot = sc->iot; ioh = sc->ioh; |