|
@@ -159,28 +159,36 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue)
|
|
|
pm_runtime_put_noidle(&card->dev);
|
|
|
dev_err(glue->dev, "%s: failed to get_sync(%d)\n",
|
|
|
__func__, ret);
|
|
|
- goto out;
|
|
|
+
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
sdio_claim_host(func);
|
|
|
sdio_enable_func(func);
|
|
|
sdio_release_host(func);
|
|
|
|
|
|
-out:
|
|
|
- return ret;
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
|
|
|
{
|
|
|
struct sdio_func *func = dev_to_sdio_func(glue->dev);
|
|
|
struct mmc_card *card = func->card;
|
|
|
+ int error;
|
|
|
|
|
|
sdio_claim_host(func);
|
|
|
sdio_disable_func(func);
|
|
|
sdio_release_host(func);
|
|
|
|
|
|
/* Let runtime PM know the card is powered off */
|
|
|
- return pm_runtime_put_sync(&card->dev);
|
|
|
+ error = pm_runtime_put(&card->dev);
|
|
|
+ if (error < 0 && error != -EBUSY) {
|
|
|
+ dev_err(&card->dev, "%s failed: %i\n", __func__, error);
|
|
|
+
|
|
|
+ return error;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
static int wl12xx_sdio_set_power(struct device *child, bool enable)
|