diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-01-24 13:23:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-28 15:42:00 -0500 |
commit | 9ac58615d93c8a28b1c649a90a5e2ede4dfd368a (patch) | |
tree | c17d665e6de3b05bc20d75af1c90d4d15e686e45 /drivers/net/wireless/ath/ath9k/ahb.c | |
parent | 0cdd5c60e4538d02414144e0682941a4eb20ffa8 (diff) |
ath9k: fold struct ath_wiphy into struct ath_softc
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ahb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ahb.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index 72f430e956ec..993672105963 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c | |||
@@ -54,7 +54,6 @@ static struct ath_bus_ops ath_ahb_bus_ops = { | |||
54 | static int ath_ahb_probe(struct platform_device *pdev) | 54 | static int ath_ahb_probe(struct platform_device *pdev) |
55 | { | 55 | { |
56 | void __iomem *mem; | 56 | void __iomem *mem; |
57 | struct ath_wiphy *aphy; | ||
58 | struct ath_softc *sc; | 57 | struct ath_softc *sc; |
59 | struct ieee80211_hw *hw; | 58 | struct ieee80211_hw *hw; |
60 | struct resource *res; | 59 | struct resource *res; |
@@ -92,8 +91,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
92 | 91 | ||
93 | irq = res->start; | 92 | irq = res->start; |
94 | 93 | ||
95 | hw = ieee80211_alloc_hw(sizeof(struct ath_wiphy) + | 94 | hw = ieee80211_alloc_hw(sizeof(struct ath_softc), &ath9k_ops); |
96 | sizeof(struct ath_softc), &ath9k_ops); | ||
97 | if (hw == NULL) { | 95 | if (hw == NULL) { |
98 | dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); | 96 | dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); |
99 | ret = -ENOMEM; | 97 | ret = -ENOMEM; |
@@ -103,10 +101,7 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
103 | SET_IEEE80211_DEV(hw, &pdev->dev); | 101 | SET_IEEE80211_DEV(hw, &pdev->dev); |
104 | platform_set_drvdata(pdev, hw); | 102 | platform_set_drvdata(pdev, hw); |
105 | 103 | ||
106 | aphy = hw->priv; | 104 | sc = hw->priv; |
107 | sc = (struct ath_softc *) (aphy + 1); | ||
108 | aphy->sc = sc; | ||
109 | aphy->hw = hw; | ||
110 | sc->hw = hw; | 105 | sc->hw = hw; |
111 | sc->dev = &pdev->dev; | 106 | sc->dev = &pdev->dev; |
112 | sc->mem = mem; | 107 | sc->mem = mem; |
@@ -150,8 +145,7 @@ static int ath_ahb_remove(struct platform_device *pdev) | |||
150 | struct ieee80211_hw *hw = platform_get_drvdata(pdev); | 145 | struct ieee80211_hw *hw = platform_get_drvdata(pdev); |
151 | 146 | ||
152 | if (hw) { | 147 | if (hw) { |
153 | struct ath_wiphy *aphy = hw->priv; | 148 | struct ath_softc *sc = hw->priv; |
154 | struct ath_softc *sc = aphy->sc; | ||
155 | void __iomem *mem = sc->mem; | 149 | void __iomem *mem = sc->mem; |
156 | 150 | ||
157 | ath9k_deinit_device(sc); | 151 | ath9k_deinit_device(sc); |