diff options
author | Sam Leffler <sam@FreeBSD.org> | 2006-06-05 17:51:20 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2006-06-05 17:51:20 +0000 |
commit | f9fc583f179e4a811b7f5058626e99e549412e42 (patch) | |
tree | 6d698fccf1390fee0ca6fcb3d3cfd28bf9c03fe4 /sys/dev | |
parent | 624fc6d1d9957065529c1b19a2e4c81b2e5e361e (diff) | |
download | src-f9fc583f179e4a811b7f5058626e99e549412e42.tar.gz src-f9fc583f179e4a811b7f5058626e99e549412e42.zip |
move hal bus+tag externalization to the bus glue code where it belongs;
this is a noop on all current freebsd architectures
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=159290
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ath/if_ath.c | 3 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_pci.c | 5 | ||||
-rw-r--r-- | sys/dev/ath/if_athvar.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index aeee9059c30a..c4fe26890afd 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -293,8 +293,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); - ah = ath_hal_attach(devid, sc, (HAL_BUS_TAG) sc->sc_st, - (HAL_BUS_HANDLE) sc->sc_sh, &status); + ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, &status); if (ah == NULL) { if_printf(ifp, "unable to attach hardware; HAL status %u\n", status); diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c index cbed3c0d7a22..686fc4daa710 100644 --- a/sys/dev/ath/if_ath_pci.c +++ b/sys/dev/ath/if_ath_pci.c @@ -148,8 +148,9 @@ ath_pci_attach(device_t dev) device_printf(dev, "cannot map register space\n"); goto bad; } - sc->sc_st = rman_get_bustag(psc->sc_sr); - sc->sc_sh = rman_get_bushandle(psc->sc_sr); + /* NB: these casts are known to be safe */ + sc->sc_st = (HAL_BUS_TAG) rman_get_bustag(psc->sc_sr); + sc->sc_sh = (HAL_BUS_HANDLE) rman_get_bushandle(psc->sc_sr); /* * Mark device invalid so any interrupts (shared or otherwise) * that arrive before the HAL is setup are discarded. diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index 4c90d47c2f95..486805e4b392 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -181,8 +181,8 @@ struct ath_softc { enum ieee80211_state, int); void (*sc_node_free)(struct ieee80211_node *); device_t sc_dev; - bus_space_tag_t sc_st; /* bus space tag */ - bus_space_handle_t sc_sh; /* bus space handle */ + HAL_BUS_TAG sc_st; /* bus space tag */ + HAL_BUS_HANDLE sc_sh; /* bus space handle */ bus_dma_tag_t sc_dmat; /* bus DMA tag */ struct mtx sc_mtx; /* master lock (recursive) */ struct taskqueue *sc_tq; /* private task queue */ |