diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-15 16:46:34 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-03-24 06:00:11 -0400 |
commit | d7646f7632549124fe70fec8af834c7c1246f365 (patch) | |
tree | d69cf32f089d84f7a1d7813f7c8dd8b980170b25 /drivers/pcmcia/m8xx_pcmcia.c | |
parent | e7176a37d436a214f6a7727ea7986c654cbee8f0 (diff) |
pcmcia: use dev_pm_ops for class pcmcia_socket_class
Instead of requiring PCMCIA socket drivers to call various functions
during their (bus) resume and suspend functions, register an own
dev_pm_ops for this class. This fixes several suspend/resume bugs
seen on db1xxx-ss, and probably on some other socket drivers, too.
With regard to the asymmetry with only _noirq suspend, but split up
resume, please see bug 14334 and commit 9905d1b411946fb3 .
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/m8xx_pcmcia.c')
-rw-r--r-- | drivers/pcmcia/m8xx_pcmcia.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index 61c215918128..01ef7de15322 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
@@ -1288,21 +1288,6 @@ static int m8xx_remove(struct of_device *ofdev) | |||
1288 | return 0; | 1288 | return 0; |
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | #ifdef CONFIG_PM | ||
1292 | static int m8xx_suspend(struct platform_device *pdev, pm_message_t state) | ||
1293 | { | ||
1294 | return pcmcia_socket_dev_suspend(&pdev->dev); | ||
1295 | } | ||
1296 | |||
1297 | static int m8xx_resume(struct platform_device *pdev) | ||
1298 | { | ||
1299 | return pcmcia_socket_dev_resume(&pdev->dev); | ||
1300 | } | ||
1301 | #else | ||
1302 | #define m8xx_suspend NULL | ||
1303 | #define m8xx_resume NULL | ||
1304 | #endif | ||
1305 | |||
1306 | static const struct of_device_id m8xx_pcmcia_match[] = { | 1291 | static const struct of_device_id m8xx_pcmcia_match[] = { |
1307 | { | 1292 | { |
1308 | .type = "pcmcia", | 1293 | .type = "pcmcia", |
@@ -1318,8 +1303,6 @@ static struct of_platform_driver m8xx_pcmcia_driver = { | |||
1318 | .match_table = m8xx_pcmcia_match, | 1303 | .match_table = m8xx_pcmcia_match, |
1319 | .probe = m8xx_probe, | 1304 | .probe = m8xx_probe, |
1320 | .remove = m8xx_remove, | 1305 | .remove = m8xx_remove, |
1321 | .suspend = m8xx_suspend, | ||
1322 | .resume = m8xx_resume, | ||
1323 | }; | 1306 | }; |
1324 | 1307 | ||
1325 | static int __init m8xx_init(void) | 1308 | static int __init m8xx_init(void) |