From d7646f7632549124fe70fec8af834c7c1246f365 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 15 Mar 2010 21:46:34 +0100 Subject: 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 --- drivers/pcmcia/m8xx_pcmcia.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'drivers/pcmcia/m8xx_pcmcia.c') 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) return 0; } -#ifdef CONFIG_PM -static int m8xx_suspend(struct platform_device *pdev, pm_message_t state) -{ - return pcmcia_socket_dev_suspend(&pdev->dev); -} - -static int m8xx_resume(struct platform_device *pdev) -{ - return pcmcia_socket_dev_resume(&pdev->dev); -} -#else -#define m8xx_suspend NULL -#define m8xx_resume NULL -#endif - static const struct of_device_id m8xx_pcmcia_match[] = { { .type = "pcmcia", @@ -1318,8 +1303,6 @@ static struct of_platform_driver m8xx_pcmcia_driver = { .match_table = m8xx_pcmcia_match, .probe = m8xx_probe, .remove = m8xx_remove, - .suspend = m8xx_suspend, - .resume = m8xx_resume, }; static int __init m8xx_init(void) -- cgit v1.2.3