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>
 {
        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);
 }
 
 
 {
        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;