aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 4ae7b5f12029..f2afcbefc076 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -49,16 +49,6 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
49 *csz = DEFAULT_CACHELINE >> 2; /* Use the default size */ 49 *csz = DEFAULT_CACHELINE >> 2; /* Use the default size */
50} 50}
51 51
52static void ath_pci_cleanup(struct ath_common *common)
53{
54 struct ath_softc *sc = (struct ath_softc *) common->priv;
55 struct pci_dev *pdev = to_pci_dev(sc->dev);
56
57 pci_iounmap(pdev, sc->mem);
58 pci_disable_device(pdev);
59 pci_release_region(pdev, 0);
60}
61
62static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data) 52static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
63{ 53{
64 struct ath_hw *ah = (struct ath_hw *) common->ah; 54 struct ath_hw *ah = (struct ath_hw *) common->ah;
@@ -98,7 +88,6 @@ static void ath_pci_bt_coex_prep(struct ath_common *common)
98 88
99static const struct ath_bus_ops ath_pci_bus_ops = { 89static const struct ath_bus_ops ath_pci_bus_ops = {
100 .read_cachesize = ath_pci_read_cachesize, 90 .read_cachesize = ath_pci_read_cachesize,
101 .cleanup = ath_pci_cleanup,
102 .eeprom_read = ath_pci_eeprom_read, 91 .eeprom_read = ath_pci_eeprom_read,
103 .bt_coex_prep = ath_pci_bt_coex_prep, 92 .bt_coex_prep = ath_pci_bt_coex_prep,
104}; 93};
@@ -245,12 +234,15 @@ static void ath_pci_remove(struct pci_dev *pdev)
245 struct ieee80211_hw *hw = pci_get_drvdata(pdev); 234 struct ieee80211_hw *hw = pci_get_drvdata(pdev);
246 struct ath_wiphy *aphy = hw->priv; 235 struct ath_wiphy *aphy = hw->priv;
247 struct ath_softc *sc = aphy->sc; 236 struct ath_softc *sc = aphy->sc;
248 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 237 void __iomem *mem = sc->mem;
249 238
250 ath9k_deinit_device(sc); 239 ath9k_deinit_device(sc);
251 free_irq(sc->irq, sc); 240 free_irq(sc->irq, sc);
252 ieee80211_free_hw(sc->hw); 241 ieee80211_free_hw(sc->hw);
253 ath_bus_cleanup(common); 242
243 pci_iounmap(pdev, mem);
244 pci_disable_device(pdev);
245 pci_release_region(pdev, 0);
254} 246}
255 247
256#ifdef CONFIG_PM 248#ifdef CONFIG_PM