diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-04-29 16:53:32 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-01 15:25:49 -0400 |
commit | 55850945e872531644f31fefd217d61dd15dcab8 (patch) | |
tree | 412ee1338d0b69e4d6e2a5e518e30e6660704921 /kernel/power | |
parent | 7483b4a4d9abf9dcf1ffe6e805ead2847ec3264e (diff) |
PM / Sleep: Add "prevent autosleep time" statistics to wakeup sources
Android uses one wakelock statistics that is only necessary for
opportunistic sleep. Namely, the prevent_suspend_time field
accumulates the total time the given wakelock has been locked
while "automatic suspend" was enabled. Add an analogous field,
prevent_sleep_time, to wakeup sources and make it behave in a similar
way.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/autosleep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/power/autosleep.c b/kernel/power/autosleep.c index 42348e3589d3..ca304046d9e2 100644 --- a/kernel/power/autosleep.c +++ b/kernel/power/autosleep.c | |||
@@ -101,8 +101,12 @@ int pm_autosleep_set_state(suspend_state_t state) | |||
101 | 101 | ||
102 | __pm_relax(autosleep_ws); | 102 | __pm_relax(autosleep_ws); |
103 | 103 | ||
104 | if (state > PM_SUSPEND_ON) | 104 | if (state > PM_SUSPEND_ON) { |
105 | pm_wakep_autosleep_enabled(true); | ||
105 | queue_up_suspend_work(); | 106 | queue_up_suspend_work(); |
107 | } else { | ||
108 | pm_wakep_autosleep_enabled(false); | ||
109 | } | ||
106 | 110 | ||
107 | mutex_unlock(&autosleep_lock); | 111 | mutex_unlock(&autosleep_lock); |
108 | return 0; | 112 | return 0; |