diff options
| author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-14 07:34:31 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-14 07:34:31 -0400 |
| commit | 17f2ae7f677f023997e02fd2ebabd90ea2a0390d (patch) | |
| tree | 9f333057d8771adc432687417c2bfe28164f1e48 /drivers/base | |
| parent | 91d85ea6786107aa2837bef3e957165ad7c8b823 (diff) | |
PM / Domains: Fix build for CONFIG_PM_RUNTIME unset
Function genpd_queue_power_off_work() is not defined for
CONFIG_PM_RUNTIME, so pm_genpd_poweroff_unused() causes a build
error to happen in that case. Fix the problem by making
pm_genpd_poweroff_unused() depend on CONFIG_PM_RUNTIME too.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/power/domain.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e18566a0fedd..1c374579407c 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) | |||
| 460 | return 0; | 460 | return 0; |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | /** | ||
| 464 | * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use. | ||
| 465 | */ | ||
| 466 | void pm_genpd_poweroff_unused(void) | ||
| 467 | { | ||
| 468 | struct generic_pm_domain *genpd; | ||
| 469 | |||
| 470 | mutex_lock(&gpd_list_lock); | ||
| 471 | |||
| 472 | list_for_each_entry(genpd, &gpd_list, gpd_list_node) | ||
| 473 | genpd_queue_power_off_work(genpd); | ||
| 474 | |||
| 475 | mutex_unlock(&gpd_list_lock); | ||
| 476 | } | ||
| 477 | |||
| 463 | #else | 478 | #else |
| 464 | 479 | ||
| 465 | static inline void genpd_power_off_work_fn(struct work_struct *work) {} | 480 | 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, | |||
| 1255 | list_add(&genpd->gpd_list_node, &gpd_list); | 1270 | list_add(&genpd->gpd_list_node, &gpd_list); |
| 1256 | mutex_unlock(&gpd_list_lock); | 1271 | mutex_unlock(&gpd_list_lock); |
| 1257 | } | 1272 | } |
| 1258 | |||
| 1259 | /** | ||
| 1260 | * pm_genpd_poweroff_unused - Power off all PM domains with no devices in use. | ||
| 1261 | */ | ||
| 1262 | void pm_genpd_poweroff_unused(void) | ||
| 1263 | { | ||
| 1264 | struct generic_pm_domain *genpd; | ||
| 1265 | |||
| 1266 | mutex_lock(&gpd_list_lock); | ||
| 1267 | |||
| 1268 | list_for_each_entry(genpd, &gpd_list, gpd_list_node) | ||
| 1269 | genpd_queue_power_off_work(genpd); | ||
| 1270 | |||
| 1271 | mutex_unlock(&gpd_list_lock); | ||
| 1272 | } | ||
