提交 53b7c2b2 编写于 作者: R Richard Purdie 提交者: Russell King

[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: NRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 b7557de4
...@@ -660,7 +660,6 @@ source "kernel/power/Kconfig" ...@@ -660,7 +660,6 @@ source "kernel/power/Kconfig"
config APM config APM
tristate "Advanced Power Management Emulation" tristate "Advanced Power Management Emulation"
depends on PM_LEGACY
---help--- ---help---
APM is a BIOS specification for saving power using several different APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with techniques. This is mostly useful for battery powered laptops with
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/apm_bios.h> #include <linux/apm_bios.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/pm_legacy.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -81,6 +80,7 @@ struct apm_user { ...@@ -81,6 +80,7 @@ struct apm_user {
*/ */
static int suspends_pending; static int suspends_pending;
static int apm_disabled; static int apm_disabled;
static int arm_apm_active;
static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
...@@ -477,9 +477,9 @@ static int kapmd(void *arg) ...@@ -477,9 +477,9 @@ static int kapmd(void *arg)
apm_event_t event; apm_event_t event;
wait_event_interruptible(kapmd_wait, wait_event_interruptible(kapmd_wait,
!queue_empty(&kapmd_queue) || !pm_active); !queue_empty(&kapmd_queue) || !arm_apm_active);
if (!pm_active) if (!arm_apm_active)
break; break;
spin_lock_irq(&kapmd_queue_lock); spin_lock_irq(&kapmd_queue_lock);
...@@ -522,16 +522,11 @@ static int __init apm_init(void) ...@@ -522,16 +522,11 @@ static int __init apm_init(void)
return -ENODEV; return -ENODEV;
} }
if (PM_IS_ACTIVE()) { arm_apm_active = 1;
printk(KERN_NOTICE "apm: overridden by ACPI.\n");
return -EINVAL;
}
pm_active = 1;
ret = kernel_thread(kapmd, NULL, CLONE_KERNEL); ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
if (ret < 0) { if (ret < 0) {
pm_active = 0; arm_apm_active = 0;
return ret; return ret;
} }
...@@ -543,7 +538,7 @@ static int __init apm_init(void) ...@@ -543,7 +538,7 @@ static int __init apm_init(void)
if (ret != 0) { if (ret != 0) {
remove_proc_entry("apm", NULL); remove_proc_entry("apm", NULL);
pm_active = 0; arm_apm_active = 0;
wake_up(&kapmd_wait); wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit); wait_for_completion(&kapmd_exit);
} }
...@@ -556,7 +551,7 @@ static void __exit apm_exit(void) ...@@ -556,7 +551,7 @@ static void __exit apm_exit(void)
misc_deregister(&apm_device); misc_deregister(&apm_device);
remove_proc_entry("apm", NULL); remove_proc_entry("apm", NULL);
pm_active = 0; arm_apm_active = 0;
wake_up(&kapmd_wait); wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit); wait_for_completion(&kapmd_exit);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册