diff options
author | imp <imp@FreeBSD.org> | 2004-07-01 17:23:11 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-07-01 17:23:11 +0000 |
commit | 1548fadf09635d685cfaa4f944d45eb0d0b5cde0 (patch) | |
tree | 3cf933d76f516fe1f9713869a7140adbb8fb4398 | |
parent | 35a5a36dea79a08a20cb68c66e483d7ec57bacce (diff) | |
download | FreeBSD-src-1548fadf09635d685cfaa4f944d45eb0d0b5cde0.zip FreeBSD-src-1548fadf09635d685cfaa4f944d45eb0d0b5cde0.tar.gz |
While this file still needs __RMAN_RESOURCE_VISIBLE to get the size of
the struct resource for a malloc, it no longer needs it for the r_
elements of struct resource with this commit.
-rw-r--r-- | sys/dev/puc/puc.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c index fb7f683..d953c4b 100644 --- a/sys/dev/puc/puc.c +++ b/sys/dev/puc/puc.c @@ -174,6 +174,7 @@ puc_attach(device_t dev, const struct puc_device_description *desc) struct puc_device *pdev; struct resource *res; struct resource_list_entry *rle; + bus_space_handle_t bh; if (desc == NULL) return (ENXIO); @@ -322,14 +323,16 @@ puc_attach(device_t dev, const struct puc_device_description *desc) return (ENOMEM); } - rle->res->r_start = rman_get_start(res) + - sc->sc_desc.ports[i].offset; - rle->res->r_end = rle->res->r_start + ressz - 1; - rle->res->r_bustag = rman_get_bustag(res); - bus_space_subregion(rle->res->r_bustag, + rman_set_start(rle->res, rman_get_start(res) + + sc->sc_desc.ports[i].offset); + rman_set_end(rle->res, rman_get_start(rle->res) + + ressz - 1); + rman_set_bustag(rle->res, rman_get_bustag(res)); + bus_space_subregion(rman_get_bustag(rle->res), rman_get_bushandle(res), sc->sc_desc.ports[i].offset, ressz, - &rle->res->r_bushandle); + &bh); + rman_set_bushandle(rle->res, bh); } pdev->port = i + 1; |