diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-03-19 11:53:55 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-26 12:35:17 +1000 |
commit | 70b52b3869a31aab85241a1f998f9943a3905637 (patch) | |
tree | 3c6944c5545c206cc43b8c20f1b9fe150b7ac0e9 /drivers/macintosh/apm_emu.c | |
parent | 17e638bc28f2fdc9c0d3eebfb80fce43827b8d12 (diff) | |
download | blackbird-op-linux-70b52b3869a31aab85241a1f998f9943a3905637.tar.gz blackbird-op-linux-70b52b3869a31aab85241a1f998f9943a3905637.zip |
[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 'drivers/macintosh/apm_emu.c')
-rw-r--r-- | drivers/macintosh/apm_emu.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index c5e4d43f97fc..cdb0bead9917 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c @@ -96,7 +96,7 @@ static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); static struct apm_user * user_list; -static int apm_notify_sleep(struct pmu_sleep_notifier *self, int when); +static void apm_notify_sleep(struct pmu_sleep_notifier *self, int when); static struct pmu_sleep_notifier apm_sleep_notifier = { apm_notify_sleep, SLEEP_LEVEL_USERLAND, @@ -352,7 +352,7 @@ static int do_open(struct inode * inode, struct file * filp) * doesn't provide a way to NAK, but this could be added * here. */ -static int wait_all_suspend(void) +static void wait_all_suspend(void) { DECLARE_WAITQUEUE(wait, current); @@ -366,24 +366,19 @@ static int wait_all_suspend(void) remove_wait_queue(&apm_suspend_waitqueue, &wait); DBG("apm_emu: wait_all_suspend() - complete !\n"); - - return 1; } -static int apm_notify_sleep(struct pmu_sleep_notifier *self, int when) +static void apm_notify_sleep(struct pmu_sleep_notifier *self, int when) { switch(when) { case PBOOK_SLEEP_REQUEST: queue_event(APM_SYS_SUSPEND, NULL); - if (!wait_all_suspend()) - return PBOOK_SLEEP_REFUSE; + wait_all_suspend(); break; - case PBOOK_SLEEP_REJECT: case PBOOK_WAKE: queue_event(APM_NORMAL_RESUME, NULL); break; } - return PBOOK_SLEEP_OK; } #define APM_CRITICAL 10 |