Skip to content

Commit

Permalink
wl1271: Fixed unloading of the wl1271_sdio module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Teemu Paasikivi authored and John W. Linville committed Mar 9, 2010
1 parent 09a9c2b commit 49d7f6d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/wl12xx/wl1271_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ static int __devinit wl1271_probe(struct sdio_func *func,
goto out_irq;

sdio_claim_host(func);
sdio_set_drvdata(func, wl);

ret = sdio_enable_func(func);
if (ret)
goto out_release;
Expand Down Expand Up @@ -246,10 +248,11 @@ static void __devexit wl1271_remove(struct sdio_func *func)
{
struct wl1271 *wl = sdio_get_drvdata(func);

ieee80211_unregister_hw(wl->hw);

sdio_claim_host(func);
sdio_disable_func(func);
sdio_release_host(func);
ieee80211_unregister_hw(wl->hw);

free_irq(wl->irq, wl);

Expand Down

0 comments on commit 49d7f6d

Please sign in to comment.