aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-01-05 15:44:55 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-05 15:44:55 -0500
commit53b7c2b243bd31f857dddabd9339f2dd6ae3fb67 (patch)
tree5db702d4ad645ed477ed8096f069bc194dede94d
parentb7557de41a04346cb545d4dda7088760cb96e713 (diff)
[ARM] 3229/1: Remove uneeded ARM apm dependency on PM_LEGACY
Patch from Richard Purdie ARM doesn't use ACPI so ARM's apm implementation has no need to depend on PM_LEGACY. This patch removes that dependency. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/kernel/apm.c19
2 files changed, 7 insertions, 13 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cb413109da0c..16a5d522b2f2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -660,7 +660,6 @@ source "kernel/power/Kconfig"
660 660
661config APM 661config APM
662 tristate "Advanced Power Management Emulation" 662 tristate "Advanced Power Management Emulation"
663 depends on PM_LEGACY
664 ---help--- 663 ---help---
665 APM is a BIOS specification for saving power using several different 664 APM is a BIOS specification for saving power using several different
666 techniques. This is mostly useful for battery powered laptops with 665 techniques. This is mostly useful for battery powered laptops with
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
index a2843be05557..b9df1b782bb1 100644
--- a/arch/arm/kernel/apm.c
+++ b/arch/arm/kernel/apm.c
@@ -20,7 +20,6 @@
20#include <linux/apm_bios.h> 20#include <linux/apm_bios.h>
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/pm.h> 22#include <linux/pm.h>
23#include <linux/pm_legacy.h>
24#include <linux/device.h> 23#include <linux/device.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/list.h> 25#include <linux/list.h>
@@ -81,6 +80,7 @@ struct apm_user {
81 */ 80 */
82static int suspends_pending; 81static int suspends_pending;
83static int apm_disabled; 82static int apm_disabled;
83static int arm_apm_active;
84 84
85static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); 85static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
86static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); 86static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
@@ -477,9 +477,9 @@ static int kapmd(void *arg)
477 apm_event_t event; 477 apm_event_t event;
478 478
479 wait_event_interruptible(kapmd_wait, 479 wait_event_interruptible(kapmd_wait,
480 !queue_empty(&kapmd_queue) || !pm_active); 480 !queue_empty(&kapmd_queue) || !arm_apm_active);
481 481
482 if (!pm_active) 482 if (!arm_apm_active)
483 break; 483 break;
484 484
485 spin_lock_irq(&kapmd_queue_lock); 485 spin_lock_irq(&kapmd_queue_lock);
@@ -522,16 +522,11 @@ static int __init apm_init(void)
522 return -ENODEV; 522 return -ENODEV;
523 } 523 }
524 524
525 if (PM_IS_ACTIVE()) { 525 arm_apm_active = 1;
526 printk(KERN_NOTICE "apm: overridden by ACPI.\n");
527 return -EINVAL;
528 }
529
530 pm_active = 1;
531 526
532 ret = kernel_thread(kapmd, NULL, CLONE_KERNEL); 527 ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
533 if (ret < 0) { 528 if (ret < 0) {
534 pm_active = 0; 529 arm_apm_active = 0;
535 return ret; 530 return ret;
536 } 531 }
537 532
@@ -543,7 +538,7 @@ static int __init apm_init(void)
543 if (ret != 0) { 538 if (ret != 0) {
544 remove_proc_entry("apm", NULL); 539 remove_proc_entry("apm", NULL);
545 540
546 pm_active = 0; 541 arm_apm_active = 0;
547 wake_up(&kapmd_wait); 542 wake_up(&kapmd_wait);
548 wait_for_completion(&kapmd_exit); 543 wait_for_completion(&kapmd_exit);
549 } 544 }
@@ -556,7 +551,7 @@ static void __exit apm_exit(void)
556 misc_deregister(&apm_device); 551 misc_deregister(&apm_device);
557 remove_proc_entry("apm", NULL); 552 remove_proc_entry("apm", NULL);
558 553
559 pm_active = 0; 554 arm_apm_active = 0;
560 wake_up(&kapmd_wait); 555 wake_up(&kapmd_wait);
561 wait_for_completion(&kapmd_exit); 556 wait_for_completion(&kapmd_exit);
562} 557}