summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-17 20:15:25 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-17 20:15:25 (GMT)
commitb4fd4ae6c6420c18e4bae2c294b7e06f5ff5210f (patch)
treea948e1f99dbce5d34da04b3e655d3655335848d7 /drivers
parentaa462abe8aaf2198d6aef97da20c874ac694a39f (diff)
parent17f2ae7f677f023997e02fd2ebabd90ea2a0390d (diff)
downloadlinux-b4fd4ae6c6420c18e4bae2c294b7e06f5ff5210f.tar.xz
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / Domains: Fix build for CONFIG_PM_RUNTIME unset
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/power/domain.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index e18566a..1c37457 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -460,6 +460,21 @@ static int pm_genpd_runtime_resume(struct device *dev)
return 0;
}
+/**
+ * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
+ */
+void pm_genpd_poweroff_unused(void)
+{
+ struct generic_pm_domain *genpd;
+
+ mutex_lock(&gpd_list_lock);
+
+ list_for_each_entry(genpd, &gpd_list, gpd_list_node)
+ genpd_queue_power_off_work(genpd);
+
+ mutex_unlock(&gpd_list_lock);
+}
+
#else
static inline void genpd_power_off_work_fn(struct work_struct *work) {}
@@ -1255,18 +1270,3 @@ void pm_genpd_init(struct generic_pm_domain *genpd,
list_add(&genpd->gpd_list_node, &gpd_list);
mutex_unlock(&gpd_list_lock);
}
-
-/**
- * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
- */
-void pm_genpd_poweroff_unused(void)
-{
- struct generic_pm_domain *genpd;
-
- mutex_lock(&gpd_list_lock);
-
- list_for_each_entry(genpd, &gpd_list, gpd_list_node)
- genpd_queue_power_off_work(genpd);
-
- mutex_unlock(&gpd_list_lock);
-}