Merge branch 'master' of github.com:davem330/net
[linux-2.6.git] / drivers / net / wireless / wl12xx / sdio.c
index 4dc4573..516a898 100644 (file)
@@ -164,15 +164,15 @@ static int wl1271_sdio_power_on(struct wl1271 *wl)
        /* If enabled, tell runtime PM not to power off the card */
        if (pm_runtime_enabled(&func->dev)) {
                ret = pm_runtime_get_sync(&func->dev);
-               if (ret)
+               if (ret < 0)
+                       goto out;
+       } else {
+               /* Runtime PM is disabled: power up the card manually */
+               ret = mmc_power_restore_host(func->card->host);
+               if (ret < 0)
                        goto out;
        }
 
-       /* Runtime PM might be disabled, so power up the card manually */
-       ret = mmc_power_restore_host(func->card->host);
-       if (ret < 0)
-               goto out;
-
        sdio_claim_host(func);
        sdio_enable_func(func);
 
@@ -188,7 +188,7 @@ static int wl1271_sdio_power_off(struct wl1271 *wl)
        sdio_disable_func(func);
        sdio_release_host(func);
 
-       /* Runtime PM might be disabled, so power off the card manually */
+       /* Power off the card manually, even if runtime PM is enabled. */
        ret = mmc_power_save_host(func->card->host);
        if (ret < 0)
                return ret;
@@ -412,7 +412,5 @@ module_exit(wl1271_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
 MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
-MODULE_FIRMWARE(WL1271_FW_NAME);
+MODULE_FIRMWARE(WL127X_FW_NAME);
 MODULE_FIRMWARE(WL128X_FW_NAME);
-MODULE_FIRMWARE(WL127X_AP_FW_NAME);
-MODULE_FIRMWARE(WL128X_AP_FW_NAME);