aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorOhad Ben-Cohen <ohad@wizery.com>2010-10-08 09:16:27 -0400
committerLuciano Coelho <luciano.coelho@nokia.com>2010-10-08 09:16:27 -0400
commit674f3058c806ae2591b98f59194fa85b650aa667 (patch)
treebee429bddf02036957fc075136c365ce9c4fdca1 /drivers/net/wireless/wl12xx
parent00cbb3c5317d418c349c60876fe12fba7624f3e7 (diff)
wl1271: sdio: add suspend/resume support
Add required suspend/resume support to prevent the SDIO core from removing our card completely during system suspend. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Tested-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_sdio.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index f7bef32f04c9..784ef3432641 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -290,11 +290,31 @@ static void __devexit wl1271_remove(struct sdio_func *func)
290 wl1271_free_hw(wl); 290 wl1271_free_hw(wl);
291} 291}
292 292
293static int wl1271_suspend(struct device *dev)
294{
295 /* Tell MMC/SDIO core it's OK to power down the card
296 * (if it isn't already), but not to remove it completely */
297 return 0;
298}
299
300static int wl1271_resume(struct device *dev)
301{
302 return 0;
303}
304
305static const struct dev_pm_ops wl1271_sdio_pm_ops = {
306 .suspend = wl1271_suspend,
307 .resume = wl1271_resume,
308};
309
293static struct sdio_driver wl1271_sdio_driver = { 310static struct sdio_driver wl1271_sdio_driver = {
294 .name = "wl1271_sdio", 311 .name = "wl1271_sdio",
295 .id_table = wl1271_devices, 312 .id_table = wl1271_devices,
296 .probe = wl1271_probe, 313 .probe = wl1271_probe,
297 .remove = __devexit_p(wl1271_remove), 314 .remove = __devexit_p(wl1271_remove),
315 .drv = {
316 .pm = &wl1271_sdio_pm_ops,
317 },
298}; 318};
299 319
300static int __init wl1271_init(void) 320static int __init wl1271_init(void)