git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
arch
/
arm
/
kernel
/
apm.c
diff --git
a/arch/arm/kernel/apm.c
b/arch/arm/kernel/apm.c
index
b0bbd1e
..
2bed290
100644
(file)
--- a/
arch/arm/kernel/apm.c
+++ b/
arch/arm/kernel/apm.c
@@
-18,6
+18,7
@@
#include <linux/proc_fs.h>
#include <linux/miscdevice.h>
#include <linux/apm_bios.h>
#include <linux/proc_fs.h>
#include <linux/miscdevice.h>
#include <linux/apm_bios.h>
+#include <linux/capability.h>
#include <linux/sched.h>
#include <linux/pm.h>
#include <linux/device.h>
#include <linux/sched.h>
#include <linux/pm.h>
#include <linux/device.h>
@@
-80,6
+81,7
@@
struct apm_user {
*/
static int suspends_pending;
static int apm_disabled;
*/
static int suspends_pending;
static int apm_disabled;
+static int arm_apm_active;
static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
@@
-355,10
+357,8
@@
static int apm_open(struct inode * inode, struct file * filp)
{
struct apm_user *as;
{
struct apm_user *as;
- as = (struct apm_user *)k
m
alloc(sizeof(*as), GFP_KERNEL);
+ as = (struct apm_user *)k
z
alloc(sizeof(*as), GFP_KERNEL);
if (as) {
if (as) {
- memset(as, 0, sizeof(*as));
-
/*
* XXX - this is a tiny bit broken, when we consider BSD
* process accounting. If the device is opened by root, we
/*
* XXX - this is a tiny bit broken, when we consider BSD
* process accounting. If the device is opened by root, we
@@
-476,9
+476,9
@@
static int kapmd(void *arg)
apm_event_t event;
wait_event_interruptible(kapmd_wait,
apm_event_t event;
wait_event_interruptible(kapmd_wait,
- !queue_empty(&kapmd_queue) || !pm_active);
+ !queue_empty(&kapmd_queue) || !
arm_a
pm_active);
- if (!pm_active)
+ if (!
arm_a
pm_active)
break;
spin_lock_irq(&kapmd_queue_lock);
break;
spin_lock_irq(&kapmd_queue_lock);
@@
-521,16
+521,11
@@
static int __init apm_init(void)
return -ENODEV;
}
return -ENODEV;
}
- if (PM_IS_ACTIVE()) {
- printk(KERN_NOTICE "apm: overridden by ACPI.\n");
- return -EINVAL;
- }
-
- pm_active = 1;
+ arm_apm_active = 1;
ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
if (ret < 0) {
ret = kernel_thread(kapmd, NULL, CLONE_KERNEL);
if (ret < 0) {
- pm_active = 0;
+
arm_a
pm_active = 0;
return ret;
}
return ret;
}
@@
-542,7
+537,7
@@
static int __init apm_init(void)
if (ret != 0) {
remove_proc_entry("apm", NULL);
if (ret != 0) {
remove_proc_entry("apm", NULL);
- pm_active = 0;
+
arm_a
pm_active = 0;
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
}
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
}
@@
-555,7
+550,7
@@
static void __exit apm_exit(void)
misc_deregister(&apm_device);
remove_proc_entry("apm", NULL);
misc_deregister(&apm_device);
remove_proc_entry("apm", NULL);
- pm_active = 0;
+
arm_a
pm_active = 0;
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
}
wake_up(&kapmd_wait);
wait_for_completion(&kapmd_exit);
}