Commit dd321acd authored by Bing Zhao's avatar Bing Zhao Committed by John W. Linville

mwifiex: report error to MMC core if we cannot suspend

When host_sleep_config command fails we should return error to
MMC core to indicate the failure for our device.

The misspelled variable is also removed as it's redundant.

Cc: "3.0+" <stable@vger.kernel.org>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b1a47aa5
...@@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev) ...@@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
struct sdio_mmc_card *card; struct sdio_mmc_card *card;
struct mwifiex_adapter *adapter; struct mwifiex_adapter *adapter;
mmc_pm_flag_t pm_flag = 0; mmc_pm_flag_t pm_flag = 0;
int hs_actived = 0;
int i; int i;
int ret = 0; int ret = 0;
...@@ -188,12 +187,14 @@ static int mwifiex_sdio_suspend(struct device *dev) ...@@ -188,12 +187,14 @@ static int mwifiex_sdio_suspend(struct device *dev)
adapter = card->adapter; adapter = card->adapter;
/* Enable the Host Sleep */ /* Enable the Host Sleep */
hs_actived = mwifiex_enable_hs(adapter); if (!mwifiex_enable_hs(adapter)) {
if (hs_actived) { dev_err(adapter->dev, "cmd: failed to suspend\n");
pr_debug("cmd: suspend with MMC_PM_KEEP_POWER\n"); return -EFAULT;
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
} }
dev_dbg(adapter->dev, "cmd: suspend with MMC_PM_KEEP_POWER\n");
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
/* Indicate device suspended */ /* Indicate device suspended */
adapter->is_suspended = true; adapter->is_suspended = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment