summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2013-11-18 14:32:41 +0530
committerBharat Nihalani <bnihalani@nvidia.com>2013-11-19 08:17:42 -0800
commit9e9aee68625862367b8e4ba1e8b342d17076b640 (patch)
treede6ed9c500f6d01ce6089d06c00a7670d0d791aa /drivers/base
parentd935b07231d14dc1d42d9f0124f2ca3a797f309d (diff)
PM / Domains: skip start/stop device in noirq
Bug 1401451 Change-Id: Ia7e907249223b20a6f2dea3c80207eb01163961d Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/332330 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index b42dafcb1b6a..7175c0de8662 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1200,6 +1200,7 @@ static int pm_genpd_suspend_late(struct device *dev)
static int pm_genpd_suspend_noirq(struct device *dev)
{
struct generic_pm_domain *genpd;
+ struct pm_subsys_data *psd;
dev_dbg(dev, "%s()\n", __func__);
@@ -1211,6 +1212,11 @@ static int pm_genpd_suspend_noirq(struct device *dev)
|| (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
return 0;
+ psd = dev_to_psd(dev);
+ if (psd && psd->domain_data &&
+ !to_gpd_data(psd->domain_data)->need_save)
+ return 0;
+
genpd_stop_dev(genpd, dev);
/*
@@ -1233,6 +1239,7 @@ static int pm_genpd_suspend_noirq(struct device *dev)
static int pm_genpd_resume_noirq(struct device *dev)
{
struct generic_pm_domain *genpd;
+ struct pm_subsys_data *psd;
dev_dbg(dev, "%s()\n", __func__);
@@ -1244,6 +1251,11 @@ static int pm_genpd_resume_noirq(struct device *dev)
|| (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
return 0;
+ psd = dev_to_psd(dev);
+ if (psd && psd->domain_data &&
+ !to_gpd_data(psd->domain_data)->need_save)
+ return 0;
+
/*
* Since all of the "noirq" callbacks are executed sequentially, it is
* guaranteed that this function will never run twice in parallel for