From: Teemu Paasikivi Date: Mon, 22 Feb 2010 06:38:29 +0000 (+0200) Subject: wl1271: Fixed unloading of the wl1271_sdio module X-Git-Tag: firefly_0821_release~9833^2~2087^2~167^2~621 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=49d7f6d8113a04abacdf99525db9c17d872c1efa;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Juuso Oikarinen Signed-off-by: Juuso Oikarinen Signed-off-by: John W. Linville --- 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, goto out_irq; sdio_claim_host(func); + sdio_set_drvdata(func, wl); + ret = sdio_enable_func(func); if (ret) goto out_release; @@ -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);