diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-30 11:10:12 -0400 |
| commit | 24a77daf3d80bddcece044e6dc3675e427eef3f3 (patch) | |
| tree | 2c5e0b0bea394d6fe62c5d5857c252e83e48ac48 /drivers/macintosh/apm_emu.c | |
| parent | e389f9aec689209724105ae80a6c91fd2e747bc9 (diff) | |
| parent | f900e9777fc9b65140cb9570438597bc8fae56ab (diff) | |
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
[POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
[POWERPC] remove kernel module option for booke wdt
[POWERPC] Avoid putting cpu node twice
[POWERPC] Spinlock initializer cleanup
[POWERPC] ppc4xx_sgdma needs dma-mapping.h
[POWERPC] arch/powerpc/sysdev/timer.c build fix
[POWERPC] get_property cleanups
[POWERPC] Remove the unused HTDMSOUND driver
[POWERPC] cell: cbe_cpufreq cleanup and crash fix
[POWERPC] Declare enable_kernel_spe in a header
[POWERPC] Add dt_xlate_addr() to bootwrapper
[POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
[POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
[POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
[POWERPC] Add uartlite boot console driver for the zImage wrapper
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
[POWERPC] Merge common virtex header files
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
[POWERPC] Clean up cpufreq Kconfig dependencies
...
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); | |||
| 96 | static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); | 96 | static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); |
| 97 | static struct apm_user * user_list; | 97 | static struct apm_user * user_list; |
| 98 | 98 | ||
| 99 | static int apm_notify_sleep(struct pmu_sleep_notifier *self, int when); | 99 | static void apm_notify_sleep(struct pmu_sleep_notifier *self, int when); |
| 100 | static struct pmu_sleep_notifier apm_sleep_notifier = { | 100 | static struct pmu_sleep_notifier apm_sleep_notifier = { |
| 101 | apm_notify_sleep, | 101 | apm_notify_sleep, |
| 102 | SLEEP_LEVEL_USERLAND, | 102 | SLEEP_LEVEL_USERLAND, |
| @@ -352,7 +352,7 @@ static int do_open(struct inode * inode, struct file * filp) | |||
| 352 | * doesn't provide a way to NAK, but this could be added | 352 | * doesn't provide a way to NAK, but this could be added |
| 353 | * here. | 353 | * here. |
| 354 | */ | 354 | */ |
| 355 | static int wait_all_suspend(void) | 355 | static void wait_all_suspend(void) |
| 356 | { | 356 | { |
| 357 | DECLARE_WAITQUEUE(wait, current); | 357 | DECLARE_WAITQUEUE(wait, current); |
| 358 | 358 | ||
| @@ -366,24 +366,19 @@ static int wait_all_suspend(void) | |||
| 366 | remove_wait_queue(&apm_suspend_waitqueue, &wait); | 366 | remove_wait_queue(&apm_suspend_waitqueue, &wait); |
| 367 | 367 | ||
| 368 | DBG("apm_emu: wait_all_suspend() - complete !\n"); | 368 | DBG("apm_emu: wait_all_suspend() - complete !\n"); |
| 369 | |||
| 370 | return 1; | ||
| 371 | } | 369 | } |
| 372 | 370 | ||
| 373 | static int apm_notify_sleep(struct pmu_sleep_notifier *self, int when) | 371 | static void apm_notify_sleep(struct pmu_sleep_notifier *self, int when) |
| 374 | { | 372 | { |
| 375 | switch(when) { | 373 | switch(when) { |
| 376 | case PBOOK_SLEEP_REQUEST: | 374 | case PBOOK_SLEEP_REQUEST: |
| 377 | queue_event(APM_SYS_SUSPEND, NULL); | 375 | queue_event(APM_SYS_SUSPEND, NULL); |
| 378 | if (!wait_all_suspend()) | 376 | wait_all_suspend(); |
| 379 | return PBOOK_SLEEP_REFUSE; | ||
| 380 | break; | 377 | break; |
| 381 | case PBOOK_SLEEP_REJECT: | ||
| 382 | case PBOOK_WAKE: | 378 | case PBOOK_WAKE: |
| 383 | queue_event(APM_NORMAL_RESUME, NULL); | 379 | queue_event(APM_NORMAL_RESUME, NULL); |
| 384 | break; | 380 | break; |
| 385 | } | 381 | } |
| 386 | return PBOOK_SLEEP_OK; | ||
| 387 | } | 382 | } |
| 388 | 383 | ||
| 389 | #define APM_CRITICAL 10 | 384 | #define APM_CRITICAL 10 |
