summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_bus.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-02-28 12:49:00 +0100
committerChris Ball <chris@printf.net>2014-04-22 07:06:40 -0400
commit573185cc7e646fdd5da12702ba5383e91cc25ef3 (patch)
treede598dc7d6854ec38208a4f5f1f2f0df6984daf0 /drivers/mmc/core/sdio_bus.c
parentf7bf11a3a2e0ee829a262b4b0bb09c2bb40cf6fa (diff)
downloadop-kernel-dev-573185cc7e646fdd5da12702ba5383e91cc25ef3.zip
op-kernel-dev-573185cc7e646fdd5da12702ba5383e91cc25ef3.tar.gz
mmc: core: Invoke sdio func driver's PM callbacks from the sdio bus
The sdio func device is added to the driver model after the card device. This means the sdio func device will be suspend before the card device and thus resumed after. The consequence are the mmc core don't explicity need to protect itself from receiving sdio requests in suspended state. Instead that can be handled from the sdio bus, which is thus invokes the PM callbacks instead of old dummy function. In the case were the sdio func driver don't implement the PM callbacks the mmc core will in the early phase of system suspend, remove the card from the driver model and thus power off it. Cc: Aaron Lu <aaron.lu@intel.com> Cc: NeilBrown <neilb@suse.de> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Tested-by: xiaoming wang <xiaoming.wang@intel.com> Tested-by: Chuanxiao Dong <chuanxiao.dong@intel.com> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/core/sdio_bus.c')
-rw-r--r--drivers/mmc/core/sdio_bus.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 92d1ba8..4fa8fef9 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -197,20 +197,8 @@ static int sdio_bus_remove(struct device *dev)
#ifdef CONFIG_PM
-#ifdef CONFIG_PM_SLEEP
-static int pm_no_operation(struct device *dev)
-{
- /*
- * Prevent the PM core from calling SDIO device drivers' suspend
- * callback routines, which it is not supposed to do, by using this
- * empty function as the bus type suspend callaback for SDIO.
- */
- return 0;
-}
-#endif
-
static const struct dev_pm_ops sdio_bus_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(pm_no_operation, pm_no_operation)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_generic_suspend, pm_generic_resume)
SET_RUNTIME_PM_OPS(
pm_generic_runtime_suspend,
pm_generic_runtime_resume,
OpenPOWER on IntegriCloud