]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
wl1271: Release interrupt *after* releasing the driver context
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Fri, 13 Aug 2010 02:46:48 +0000 (04:46 +0200)
committerLuciano Coelho <luciano.coelho@nokia.com>
Tue, 28 Sep 2010 09:15:09 +0000 (12:15 +0300)
The current order causes driver releasing to fail in various ways, and causes
possible instability.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
drivers/net/wireless/wl12xx/wl1271_sdio.c
drivers/net/wireless/wl12xx/wl1271_spi.c

index f2f04663627c2b43fb80b42c249748e4721ed30d..4c250d7dc3fa436d53d9c73362622d188f4d965d 100644 (file)
@@ -274,9 +274,8 @@ static void __devexit wl1271_remove(struct sdio_func *func)
 {
        struct wl1271 *wl = sdio_get_drvdata(func);
 
-       free_irq(wl->irq, wl);
-
        wl1271_unregister_hw(wl);
+       free_irq(wl->irq, wl);
        wl1271_free_hw(wl);
 }
 
index ced0a9e2c7e14c02faa5d89b917222b2d89bf573..75cbf36146e2daafe421aa59da008f2276869c7f 100644 (file)
@@ -416,9 +416,8 @@ static int __devexit wl1271_remove(struct spi_device *spi)
 {
        struct wl1271 *wl = dev_get_drvdata(&spi->dev);
 
-       free_irq(wl->irq, wl);
-
        wl1271_unregister_hw(wl);
+       free_irq(wl->irq, wl);
        wl1271_free_hw(wl);
 
        return 0;