aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorBen Dooks <ben@simtec.co.uk>2009-10-01 18:44:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-01 19:11:15 -0400
commit50d7fa9aa4183be2575bba24dd1a7651a3923fba (patch)
treef647344422c04c6ef5a5b64fa1fab49175da55fd /drivers/mmc
parent916a30775fc843e6f82e09c748a4fc70bfd4298e (diff)
s3cmci: change to use dev_pm_ops
Move to using dev_pm_ops for suspend and resume. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/s3cmci.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 63d211bfc464..6e408452855c 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1546,35 +1546,42 @@ MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);
1546 1546
1547#ifdef CONFIG_PM 1547#ifdef CONFIG_PM
1548 1548
1549static int s3cmci_suspend(struct platform_device *dev, pm_message_t state) 1549static int s3cmci_suspend(struct device *dev)
1550{ 1550{
1551 struct mmc_host *mmc = platform_get_drvdata(dev); 1551 struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
1552 struct pm_message event = { PM_EVENT_SUSPEND };
1552 1553
1553 return mmc_suspend_host(mmc, state); 1554 return mmc_suspend_host(mmc, event);
1554} 1555}
1555 1556
1556static int s3cmci_resume(struct platform_device *dev) 1557static int s3cmci_resume(struct device *dev)
1557{ 1558{
1558 struct mmc_host *mmc = platform_get_drvdata(dev); 1559 struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
1559 1560
1560 return mmc_resume_host(mmc); 1561 return mmc_resume_host(mmc);
1561} 1562}
1562 1563
1564static struct dev_pm_ops s3cmci_pm = {
1565 .suspend = s3cmci_suspend,
1566 .resume = s3cmci_resume,
1567};
1568
1569#define s3cmci_pm_ops &s3cmci_pm
1563#else /* CONFIG_PM */ 1570#else /* CONFIG_PM */
1564#define s3cmci_suspend NULL 1571#define s3cmci_pm_ops NULL
1565#define s3cmci_resume NULL
1566#endif /* CONFIG_PM */ 1572#endif /* CONFIG_PM */
1567 1573
1568 1574
1569static struct platform_driver s3cmci_driver = { 1575static struct platform_driver s3cmci_driver = {
1570 .driver.name = "s3c-sdi", 1576 .driver = {
1571 .driver.owner = THIS_MODULE, 1577 .name = "s3c-sdi",
1578 .owner = THIS_MODULE,
1579 .pm = s3cmci_pm_ops,
1580 },
1572 .id_table = s3cmci_driver_ids, 1581 .id_table = s3cmci_driver_ids,
1573 .probe = s3cmci_probe, 1582 .probe = s3cmci_probe,
1574 .remove = __devexit_p(s3cmci_remove), 1583 .remove = __devexit_p(s3cmci_remove),
1575 .shutdown = s3cmci_shutdown, 1584 .shutdown = s3cmci_shutdown,
1576 .suspend = s3cmci_suspend,
1577 .resume = s3cmci_resume,
1578}; 1585};
1579 1586
1580static int __init s3cmci_init(void) 1587static int __init s3cmci_init(void)