diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-01-14 20:17:02 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:29 -0500 |
commit | f5870acb3a8e2cad57b6c5ffd3157a7dfbb47942 (patch) | |
tree | 99c0e716a4dbd651d020d5306a16baa50a19681b /drivers/net/wireless/ath9k/xmit.c | |
parent | 2663516d8fb896430bf42dce41b3e2f141d63bd5 (diff) |
ath9k: convert to struct device
Convert 'struct pci_dev' to 'struct device' to make it usable on the AHB
bus as well.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 9e910f7a2f3..27cb9d523f5 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c @@ -340,7 +340,7 @@ static void ath_tx_complete_buf(struct ath_softc *sc, } /* Unmap this frame */ - pci_unmap_single(sc->pdev, + pci_unmap_single(to_pci_dev(sc->dev), bf->bf_dmacontext, skb->len, PCI_DMA_TODEVICE); @@ -1716,9 +1716,10 @@ static int ath_tx_setup_buffer(struct ath_softc *sc, struct ath_buf *bf, /* DMA setup */ bf->bf_mpdu = skb; - bf->bf_dmacontext = pci_map_single(sc->pdev, skb->data, + bf->bf_dmacontext = pci_map_single(to_pci_dev(sc->dev), skb->data, skb->len, PCI_DMA_TODEVICE); - if (unlikely(pci_dma_mapping_error(sc->pdev, bf->bf_dmacontext))) { + if (unlikely(pci_dma_mapping_error(to_pci_dev(sc->dev), + bf->bf_dmacontext))) { bf->bf_mpdu = NULL; DPRINTF(sc, ATH_DBG_CONFIG, "pci_dma_mapping_error() on TX\n"); |