aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sh_mmcif.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-10-01 08:01:46 -0400
committerChris Ball <cjb@laptop.org>2013-11-08 14:31:40 -0500
commit51129f31d2e7abcfb4cf35f703a42d1524c45dfa (patch)
tree6720e412a95383204783daaeb0aef0d55b48014e /drivers/mmc/host/sh_mmcif.c
parent2d9f0bd1d4a66ab5019194c5e8ec5a55c77dd7e3 (diff)
mmc: sh_mmcif: Convert to PM macros when defining dev_pm_ops
Use SET_SYSTEM_SLEEP_PM_OPS to simplify code. Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sh_mmcif.c')
-rw-r--r--drivers/mmc/host/sh_mmcif.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 6bffebe6f57a..32bc4121c965 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1538,7 +1538,7 @@ static int sh_mmcif_remove(struct platform_device *pdev)
1538 return 0; 1538 return 0;
1539} 1539}
1540 1540
1541#ifdef CONFIG_PM 1541#ifdef CONFIG_PM_SLEEP
1542static int sh_mmcif_suspend(struct device *dev) 1542static int sh_mmcif_suspend(struct device *dev)
1543{ 1543{
1544 struct sh_mmcif_host *host = dev_get_drvdata(dev); 1544 struct sh_mmcif_host *host = dev_get_drvdata(dev);
@@ -1552,10 +1552,7 @@ static int sh_mmcif_resume(struct device *dev)
1552{ 1552{
1553 return 0; 1553 return 0;
1554} 1554}
1555#else 1555#endif
1556#define sh_mmcif_suspend NULL
1557#define sh_mmcif_resume NULL
1558#endif /* CONFIG_PM */
1559 1556
1560static const struct of_device_id mmcif_of_match[] = { 1557static const struct of_device_id mmcif_of_match[] = {
1561 { .compatible = "renesas,sh-mmcif" }, 1558 { .compatible = "renesas,sh-mmcif" },
@@ -1564,8 +1561,7 @@ static const struct of_device_id mmcif_of_match[] = {
1564MODULE_DEVICE_TABLE(of, mmcif_of_match); 1561MODULE_DEVICE_TABLE(of, mmcif_of_match);
1565 1562
1566static const struct dev_pm_ops sh_mmcif_dev_pm_ops = { 1563static const struct dev_pm_ops sh_mmcif_dev_pm_ops = {
1567 .suspend = sh_mmcif_suspend, 1564 SET_SYSTEM_SLEEP_PM_OPS(sh_mmcif_suspend, sh_mmcif_resume)
1568 .resume = sh_mmcif_resume,
1569}; 1565};
1570 1566
1571static struct platform_driver sh_mmcif_driver = { 1567static struct platform_driver sh_mmcif_driver = {