summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/bus.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-10-06 11:29:42 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 12:40:33 +0100
commit0967edc6ef5c3c181cabde3178ea9f33e5130e4a (patch)
treef4a76db2682f67544b161714a2f065bb6b0ed614 /drivers/mmc/core/bus.c
parent433b7b1210a4ece4f2b4f1b04f31a2f0928c8aa8 (diff)
downloadtalos-op-linux-0967edc6ef5c3c181cabde3178ea9f33e5130e4a.tar.gz
talos-op-linux-0967edc6ef5c3c181cabde3178ea9f33e5130e4a.zip
mmc: core: Convert the mmc_driver to use the modern PM ops
Instead of having specific mmc system PM callbacks for the mmc driver, let's convert to use the common ones. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/bus.c')
-rw-r--r--drivers/mmc/core/bus.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 8a1f1240e058..2f375283c423 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -145,16 +145,13 @@ static void mmc_bus_shutdown(struct device *dev)
#ifdef CONFIG_PM_SLEEP
static int mmc_bus_suspend(struct device *dev)
{
- struct mmc_driver *drv = to_mmc_driver(dev->driver);
struct mmc_card *card = mmc_dev_to_card(dev);
struct mmc_host *host = card->host;
int ret;
- if (dev->driver && drv->suspend) {
- ret = drv->suspend(card);
- if (ret)
- return ret;
- }
+ ret = pm_generic_suspend(dev);
+ if (ret)
+ return ret;
ret = host->bus_ops->suspend(host);
return ret;
@@ -162,7 +159,6 @@ static int mmc_bus_suspend(struct device *dev)
static int mmc_bus_resume(struct device *dev)
{
- struct mmc_driver *drv = to_mmc_driver(dev->driver);
struct mmc_card *card = mmc_dev_to_card(dev);
struct mmc_host *host = card->host;
int ret;
@@ -172,9 +168,7 @@ static int mmc_bus_resume(struct device *dev)
pr_warn("%s: error %d during resume (card was removed?)\n",
mmc_hostname(host), ret);
- if (dev->driver && drv->resume)
- ret = drv->resume(card);
-
+ ret = pm_generic_resume(dev);
return ret;
}
#endif
OpenPOWER on IntegriCloud