Use the rman_* functions in preference to reaching into struct resource.

Remove __RMAN_RESOURCE_VISIBLE after compilation confirms it is now not
needed.
This commit is contained in:
Warner Losh 2004-07-03 20:48:01 +00:00
parent 8b68b82381
commit 8acf75a06d
2 changed files with 5 additions and 5 deletions

View File

@ -237,7 +237,7 @@ fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
fc->fc_bh = sc->sc_bh[rid]; fc->fc_bh = sc->sc_bh[rid];
bus_space_write_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP, bus_space_write_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP,
r->r_start); rman_get_start(r));
bus_space_read_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP); bus_space_read_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP);
error = bus_generic_setup_intr(bus, child, r, flags, fhc_intr_stub, error = bus_generic_setup_intr(bus, child, r, flags, fhc_intr_stub,
@ -251,7 +251,7 @@ fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
bus_space_write_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_ICLR, 0x0); bus_space_write_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_ICLR, 0x0);
bus_space_write_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP, bus_space_write_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP,
INTMAP_ENABLE(r->r_start, PCPU_GET(mid))); INTMAP_ENABLE(rman_get_start(r), PCPU_GET(mid)));
bus_space_read_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP); bus_space_read_4(sc->sc_bt[rid], sc->sc_bh[rid], FHC_IMAP);
return (error); return (error);

View File

@ -288,7 +288,7 @@ nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
if (res == NULL) if (res == NULL)
panic("nexus_setup_intr: NULL interrupt resource!"); panic("nexus_setup_intr: NULL interrupt resource!");
if ((res->r_flags & RF_SHAREABLE) == 0) if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
flags |= INTR_EXCL; flags |= INTR_EXCL;
/* We depend here on rman_activate_resource() being idempotent. */ /* We depend here on rman_activate_resource() being idempotent. */
@ -296,7 +296,7 @@ nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
if (error) if (error)
return (error); return (error);
error = inthand_add(device_get_nameunit(child), res->r_start, error = inthand_add(device_get_nameunit(child), rman_get_start(res),
intr, arg, flags, cookiep); intr, arg, flags, cookiep);
return (error); return (error);
@ -305,7 +305,7 @@ nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
static int static int
nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih) nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
{ {
inthand_remove(r->r_start, ih); inthand_remove(rman_get_start(r), ih);
return (0); return (0);
} }