diff options
author | ximingc <ximingc@nvidia.com> | 2014-01-27 17:17:13 +0800 |
---|---|---|
committer | Martin Chi <mchi@nvidia.com> | 2014-01-27 17:02:10 -0800 |
commit | 477a5f171ca507b0f22d2d267397c3a246184402 (patch) | |
tree | f987a54e8dc1d5c4f9c094f82cc7e92ec1c1b1fe /drivers/mmc | |
parent | 15a23b223540f6a580cc1bcbf303cdd12dd791df (diff) |
Revert "Revert "mmc: Set suspend/resume bus operations if CONFIG_PM_RUNTIME is used""
This reverts commit 866353859bcd3328dd0be84e0f0ed6d1ba834772. Moving back
suspend and resume to dev_pm_ops to ensure that bus suspend is done before
device suspend and bus resume is done after device resume. Without bus
suspend and resume, there is a chance of some requests being scheduled
after device suspend or before device resume is done.
Bug 1381236
Bug 1446176
Reviewed-on: http://git-master/r/309656
(cherry picked from commit de13dd1f8b0d802914ec4143c42730d4f90f880b)
Change-Id: I842b1e042982f8ac0547936800bbc996643c7d34
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Change-Id: I7b72b956a617762741854d49b4560d3848cf2b12
Reviewed-on: http://git-master/r/326379
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Change-Id: I0cc4d85c879dcedf671f14a83978524cd0c7f287
Signed-off-by: Ximing Chen <ximingc@nvidia.com>
Reviewed-on: http://git-master/r/360331
GVS: Gerrit_Virtual_Submit
Reviewed-by: Martin Chi <mchi@nvidia.com>
Tested-by: Martin Chi <mchi@nvidia.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/bus.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 0d7235fb0f89..c6d06a72da07 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -165,7 +165,6 @@ static int mmc_bus_resume(struct device *dev) } #ifdef CONFIG_PM_RUNTIME - static int mmc_runtime_suspend(struct device *dev) { struct mmc_card *card = mmc_dev_to_card(dev); @@ -184,21 +183,14 @@ static int mmc_runtime_idle(struct device *dev) { return pm_runtime_suspend(dev); } +#endif /* CONFIG_PM_RUNTIME */ static const struct dev_pm_ops mmc_bus_pm_ops = { - .runtime_suspend = mmc_runtime_suspend, - .runtime_resume = mmc_runtime_resume, - .runtime_idle = mmc_runtime_idle, + SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, + mmc_runtime_idle) + SET_SYSTEM_SLEEP_PM_OPS(mmc_bus_suspend, mmc_bus_resume) }; -#define MMC_PM_OPS_PTR (&mmc_bus_pm_ops) - -#else /* !CONFIG_PM_RUNTIME */ - -#define MMC_PM_OPS_PTR NULL - -#endif /* !CONFIG_PM_RUNTIME */ - static struct bus_type mmc_bus_type = { .name = "mmc", .dev_attrs = mmc_dev_attrs, @@ -206,10 +198,8 @@ static struct bus_type mmc_bus_type = { .uevent = mmc_bus_uevent, .probe = mmc_bus_probe, .remove = mmc_bus_remove, - .suspend = mmc_bus_suspend, .shutdown = mmc_bus_shutdown, - .resume = mmc_bus_resume, - .pm = MMC_PM_OPS_PTR, + .pm = &mmc_bus_pm_ops, }; int mmc_register_bus(void) |