diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-19 00:03:17 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-19 00:03:17 +0200 |
commit | 7791bd230c6fe65348456564743f99fa066f00e7 (patch) | |
tree | e9ed6b3e1baea455a65274aa054ebd29d2623b92 /drivers/cpuidle | |
parent | Merge branch 'pm-cpuidle' (diff) | |
parent | PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset (diff) | |
download | linux-7791bd230c6fe65348456564743f99fa066f00e7.tar.xz linux-7791bd230c6fe65348456564743f99fa066f00e7.zip |
Merge branch 'pm-domains'
* pm-domains:
PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
PM / Domains: Replace plain integer with NULL pointer in domain.c file
PM / Domains: Add missing static storage class specifier in domain.c file
PM / Domains: Allow device callbacks to be added at any time
PM / Domains: Add device domain data reference counter
PM / Domains: Add preliminary support for cpuidle, v2
PM / Domains: Do not stop devices after restoring their states
PM / Domains: Use subsystem runtime suspend/resume callbacks by default
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 1 | ||||
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index efa9a2ca30e7..d6a533e68e0f 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -281,6 +281,7 @@ static void poll_idle_init(struct cpuidle_driver *drv) state->power_usage = -1; state->flags = 0; state->enter = poll_idle; + state->disabled = false; } #else static void poll_idle_init(struct cpuidle_driver *drv) {} diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 8391d93f57d5..5b1f2c372c1f 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -281,6 +281,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) * unless the timer is happening really really soon. */ if (data->expected_us > 5 && + !drv->states[CPUIDLE_DRIVER_STATE_START].disabled && dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0) data->last_state_idx = CPUIDLE_DRIVER_STATE_START; @@ -292,7 +293,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) struct cpuidle_state *s = &drv->states[i]; struct cpuidle_state_usage *su = &dev->states_usage[i]; - if (su->disable) + if (s->disabled || su->disable) continue; if (s->target_residency > data->predicted_us) continue; |