summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-10-01 14:01:46 +0200
committerChris Ball <cjb@laptop.org>2013-11-08 14:31:40 -0500
commit51129f31d2e7abcfb4cf35f703a42d1524c45dfa (patch)
tree6720e412a95383204783daaeb0aef0d55b48014e /drivers/mmc
parent2d9f0bd1d4a66ab5019194c5e8ec5a55c77dd7e3 (diff)
downloadlinux-51129f31d2e7abcfb4cf35f703a42d1524c45dfa.tar.bz2
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')
-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)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int sh_mmcif_suspend(struct device *dev)
{
struct sh_mmcif_host *host = dev_get_drvdata(dev);
@@ -1552,10 +1552,7 @@ static int sh_mmcif_resume(struct device *dev)
{
return 0;
}
-#else
-#define sh_mmcif_suspend NULL
-#define sh_mmcif_resume NULL
-#endif /* CONFIG_PM */
+#endif
static const struct of_device_id mmcif_of_match[] = {
{ .compatible = "renesas,sh-mmcif" },
@@ -1564,8 +1561,7 @@ static const struct of_device_id mmcif_of_match[] = {
MODULE_DEVICE_TABLE(of, mmcif_of_match);
static const struct dev_pm_ops sh_mmcif_dev_pm_ops = {
- .suspend = sh_mmcif_suspend,
- .resume = sh_mmcif_resume,
+ SET_SYSTEM_SLEEP_PM_OPS(sh_mmcif_suspend, sh_mmcif_resume)
};
static struct platform_driver sh_mmcif_driver = {