summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2006-06-05 17:51:20 +0000
committersam <sam@FreeBSD.org>2006-06-05 17:51:20 +0000
commit0a619128b12b97ce290a4aeda326d184ed915172 (patch)
tree6d698fccf1390fee0ca6fcb3d3cfd28bf9c03fe4 /sys
parentff15bbbd3ebd2041bd998bafb67338c7e87ebd30 (diff)
downloadFreeBSD-src-0a619128b12b97ce290a4aeda326d184ed915172.zip
FreeBSD-src-0a619128b12b97ce290a4aeda326d184ed915172.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ath/if_ath.c3
-rw-r--r--sys/dev/ath/if_ath_pci.c5
-rw-r--r--sys/dev/ath/if_athvar.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index aeee905..c4fe268 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 cbed3c0..686fc4d 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 4c90d47..486805e 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 */
OpenPOWER on IntegriCloud