diff options
author | Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> | 2010-02-22 01:38:29 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-09 15:03:01 -0500 |
commit | 49d7f6d8113a04abacdf99525db9c17d872c1efa (patch) | |
tree | 6424c532360d92db32e309062fbad312342c3fca /drivers/net/wireless/wl12xx/wl1271_sdio.c | |
parent | 09a9c2b3f464e757b6597f621cc3bedb6f040a27 (diff) |
wl1271: Fixed unloading of the wl1271_sdio module
Fixed two bugs causing problems when unloding wl1271 module. First was
missing sdio_set_drvdata call from the probe function, second was order
of function calls in the remove function.
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_sdio.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_sdio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c index be5c14935bc3..7d7c85041859 100644 --- a/drivers/net/wireless/wl12xx/wl1271_sdio.c +++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c | |||
@@ -219,6 +219,8 @@ static int __devinit wl1271_probe(struct sdio_func *func, | |||
219 | goto out_irq; | 219 | goto out_irq; |
220 | 220 | ||
221 | sdio_claim_host(func); | 221 | sdio_claim_host(func); |
222 | sdio_set_drvdata(func, wl); | ||
223 | |||
222 | ret = sdio_enable_func(func); | 224 | ret = sdio_enable_func(func); |
223 | if (ret) | 225 | if (ret) |
224 | goto out_release; | 226 | goto out_release; |
@@ -246,10 +248,11 @@ static void __devexit wl1271_remove(struct sdio_func *func) | |||
246 | { | 248 | { |
247 | struct wl1271 *wl = sdio_get_drvdata(func); | 249 | struct wl1271 *wl = sdio_get_drvdata(func); |
248 | 250 | ||
251 | ieee80211_unregister_hw(wl->hw); | ||
252 | |||
249 | sdio_claim_host(func); | 253 | sdio_claim_host(func); |
250 | sdio_disable_func(func); | 254 | sdio_disable_func(func); |
251 | sdio_release_host(func); | 255 | sdio_release_host(func); |
252 | ieee80211_unregister_hw(wl->hw); | ||
253 | 256 | ||
254 | free_irq(wl->irq, wl); | 257 | free_irq(wl->irq, wl); |
255 | 258 | ||