diff options
author | Bing Zhao <bzhao@marvell.com> | 2012-11-15 18:58:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-16 14:52:25 -0500 |
commit | dd321acddc3be1371263b8c9e6c6f2af89f63d57 (patch) | |
tree | b2feb7686fcca7965b8cc6327ab2767fa1ce7efc /drivers/net | |
parent | b1a47aa5e1e159e2cb06d7dfcc17ef5149b09299 (diff) |
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: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index fc8a9bfa1248..82cf0fa2d9f6 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c | |||
@@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev) | |||
161 | struct sdio_mmc_card *card; | 161 | struct sdio_mmc_card *card; |
162 | struct mwifiex_adapter *adapter; | 162 | struct mwifiex_adapter *adapter; |
163 | mmc_pm_flag_t pm_flag = 0; | 163 | mmc_pm_flag_t pm_flag = 0; |
164 | int hs_actived = 0; | ||
165 | int i; | 164 | int i; |
166 | int ret = 0; | 165 | int ret = 0; |
167 | 166 | ||
@@ -188,12 +187,14 @@ static int mwifiex_sdio_suspend(struct device *dev) | |||
188 | adapter = card->adapter; | 187 | adapter = card->adapter; |
189 | 188 | ||
190 | /* Enable the Host Sleep */ | 189 | /* Enable the Host Sleep */ |
191 | hs_actived = mwifiex_enable_hs(adapter); | 190 | if (!mwifiex_enable_hs(adapter)) { |
192 | if (hs_actived) { | 191 | dev_err(adapter->dev, "cmd: failed to suspend\n"); |
193 | pr_debug("cmd: suspend with MMC_PM_KEEP_POWER\n"); | 192 | return -EFAULT; |
194 | ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); | ||
195 | } | 193 | } |
196 | 194 | ||
195 | dev_dbg(adapter->dev, "cmd: suspend with MMC_PM_KEEP_POWER\n"); | ||
196 | ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); | ||
197 | |||
197 | /* Indicate device suspended */ | 198 | /* Indicate device suspended */ |
198 | adapter->is_suspended = true; | 199 | adapter->is_suspended = true; |
199 | 200 | ||