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 9905d1b411 .

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski
2010-03-15 21:46:34 +01:00
parent e7176a37d4
commit d7646f7632
19 changed files with 66 additions and 288 deletions

View File

@@ -330,24 +330,12 @@ static int __exit omap_cf_remove(struct platform_device *pdev)
return 0;
}
static int omap_cf_suspend(struct platform_device *pdev, pm_message_t mesg)
{
return pcmcia_socket_dev_suspend(&pdev->dev);
}
static int omap_cf_resume(struct platform_device *pdev)
{
return pcmcia_socket_dev_resume(&pdev->dev);
}
static struct platform_driver omap_cf_driver = {
.driver = {
.name = (char *) driver_name,
.owner = THIS_MODULE,
},
.remove = __exit_p(omap_cf_remove),
.suspend = omap_cf_suspend,
.resume = omap_cf_resume,
};
static int __init omap_cf_init(void)