aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pmu.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-03-19 06:53:55 -0400
committerPaul Mackerras <paulus@samba.org>2007-03-25 22:35:17 -0400
commit70b52b3869a31aab85241a1f998f9943a3905637 (patch)
tree3c6944c5545c206cc43b8c20f1b9fe150b7ac0e9 /include/linux/pmu.h
parent17e638bc28f2fdc9c0d3eebfb80fce43827b8d12 (diff)
[POWERPC] powermac: disallow pmu sleep notifiers from aborting sleep
Tracing through the code, no current PMU sleep notifier can abort sleep. Since no new PMU sleep notifiers should be added, this patch simplifies the code and removes the ability to abort sleep. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/linux/pmu.h')
-rw-r--r--include/linux/pmu.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 783177387ac6..b0952e532ed5 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -168,24 +168,16 @@ extern int pmu_get_model(void);
168 168
169struct pmu_sleep_notifier 169struct pmu_sleep_notifier
170{ 170{
171 int (*notifier_call)(struct pmu_sleep_notifier *self, int when); 171 void (*notifier_call)(struct pmu_sleep_notifier *self, int when);
172 int priority; 172 int priority;
173 struct list_head list; 173 struct list_head list;
174}; 174};
175 175
176/* Code values for calling sleep/wakeup handlers 176/* Code values for calling sleep/wakeup handlers
177 *
178 * Note: If a sleep request got cancelled, all drivers will get
179 * the PBOOK_SLEEP_REJECT, even those who didn't get the PBOOK_SLEEP_REQUEST.
180 */ 177 */
181#define PBOOK_SLEEP_REQUEST 1 178#define PBOOK_SLEEP_REQUEST 1
182#define PBOOK_SLEEP_NOW 2 179#define PBOOK_SLEEP_NOW 2
183#define PBOOK_SLEEP_REJECT 3 180#define PBOOK_WAKE 3
184#define PBOOK_WAKE 4
185
186/* Result codes returned by the notifiers */
187#define PBOOK_SLEEP_OK 0
188#define PBOOK_SLEEP_REFUSE -1
189 181
190/* priority levels in notifiers */ 182/* priority levels in notifiers */
191#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ 183#define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */