summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mxs-mmc.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-11-18 03:43:39 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-26 14:31:02 +0100
commitd13552908b2f3bdf917d0f4a308f69608c92c7e7 (patch)
treef89063317561014856a90b59b330b2564c78e86e /drivers/mmc/host/mxs-mmc.c
parentmmc: mxs-mmc: Register the irq with the device name (diff)
downloadlinux-d13552908b2f3bdf917d0f4a308f69608c92c7e7.tar.xz
linux-d13552908b2f3bdf917d0f4a308f69608c92c7e7.zip
mmc: mxs-mmc: Simplify PM hooks
By using SIMPLE_DEV_PM_OPS we can make the code smaller and cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mxs-mmc.c')
-rw-r--r--drivers/mmc/host/mxs-mmc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 339059a9a648..c049ac75a36a 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -702,7 +702,7 @@ static int mxs_mmc_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int mxs_mmc_suspend(struct device *dev)
{
struct mmc_host *mmc = dev_get_drvdata(dev);
@@ -722,22 +722,17 @@ static int mxs_mmc_resume(struct device *dev)
clk_prepare_enable(ssp->clk);
return 0;
}
-
-static const struct dev_pm_ops mxs_mmc_pm_ops = {
- .suspend = mxs_mmc_suspend,
- .resume = mxs_mmc_resume,
-};
#endif
+static SIMPLE_DEV_PM_OPS(mxs_mmc_pm_ops, mxs_mmc_suspend, mxs_mmc_resume);
+
static struct platform_driver mxs_mmc_driver = {
.probe = mxs_mmc_probe,
.remove = mxs_mmc_remove,
.id_table = mxs_ssp_ids,
.driver = {
.name = DRIVER_NAME,
-#ifdef CONFIG_PM
.pm = &mxs_mmc_pm_ops,
-#endif
.of_match_table = mxs_mmc_dt_ids,
},
};