From: Eyal Shapira Date: Tue, 8 Nov 2011 13:56:55 +0000 (+0200) Subject: wl12xx: fix SDIO suspend/resume X-Git-Tag: next-20111209~54^2^2~14 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b693289406f0b8ca70ab77e745be6196d5740eb0;p=karo-tx-linux.git wl12xx: fix SDIO suspend/resume 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 Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index ed97f9cee3f0..468a50553fac 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c @@ -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; @@ -324,7 +325,8 @@ out: 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) {