diff options
author | nyan <nyan@FreeBSD.org> | 2002-02-17 09:16:45 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-02-17 09:16:45 +0000 |
commit | 1ed4a21d0776cd372c00c7ab70a145f6e190ca94 (patch) | |
tree | 571d8b4d1f2c199abf241bfb63550acc815576d8 /sys/amd64/isa | |
parent | 1b92815504348bc906649e6b123b56d1add3cc0e (diff) | |
download | FreeBSD-src-1ed4a21d0776cd372c00c7ab70a145f6e190ca94.zip FreeBSD-src-1ed4a21d0776cd372c00c7ab70a145f6e190ca94.tar.gz |
- Split the routine to initialize a bus_space_handle into the separate
function.
- Only access a bus_space_handle if the resource type is SYS_RES_MEMORY or
SYS_RES_IOPORT.
- Add the bus_space_subregion supports.
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r-- | sys/amd64/isa/isa.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 9124c8d..bd1df32 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -236,11 +236,13 @@ isa_release_resource(device_t bus, device_t child, int type, int rid, */ int i; - for (i = 1; i < r->r_bushandle->bsh_ressz; i++) - resource_list_release(rl, bus, child, type, rid + i, - r->r_bushandle->bsh_res[i]); - if (r->r_bushandle->bsh_res != NULL) - free(r->r_bushandle->bsh_res, M_DEVBUF); + if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { + for (i = 1; i < r->r_bushandle->bsh_ressz; i++) + resource_list_release(rl, bus, child, type, rid + i, + r->r_bushandle->bsh_res[i]); + if (r->r_bushandle->bsh_res != NULL) + free(r->r_bushandle->bsh_res, M_DEVBUF); + } #endif return resource_list_release(rl, bus, child, type, rid, r); } |