Skip to content

Commit

Permalink
wl12xx: fix SDIO suspend/resume
Browse files Browse the repository at this point in the history
wl1271_suspend/resume() accessed the wrong struct and not wl1271
which caused it to think that wow was enabled when it wasn't.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Eyal Shapira authored and Luciano Coelho committed Nov 8, 2011
1 parent c31e494 commit b693289
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/wl12xx/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ static int wl1271_suspend(struct device *dev)
/* Tell MMC/SDIO core it's OK to power down the card
* (if it isn't already), but not to remove it completely */
struct sdio_func *func = dev_to_sdio_func(dev);
struct wl1271 *wl = sdio_get_drvdata(func);
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
struct wl1271 *wl = platform_get_drvdata(glue->core);
mmc_pm_flag_t sdio_flags;
int ret = 0;

Expand Down Expand Up @@ -324,7 +325,8 @@ static int wl1271_suspend(struct device *dev)
static int wl1271_resume(struct device *dev)
{
struct sdio_func *func = dev_to_sdio_func(dev);
struct wl1271 *wl = sdio_get_drvdata(func);
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
struct wl1271 *wl = platform_get_drvdata(glue->core);

dev_dbg(dev, "wl1271 resume\n");
if (wl->wow_enabled) {
Expand Down

0 comments on commit b693289

Please sign in to comment.