summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorAjay Nandakumar <anandakumarm@nvidia.com>2013-04-25 14:12:29 +0530
committerBharat Nihalani <bnihalani@nvidia.com>2013-10-08 05:47:18 -0700
commit4b0f875c5188419f2b09107eaad2f08f8dde4882 (patch)
treed807ebca6823056b84966efc2d0a11ff2696540c /kernel/power
parentb384beff9f80330e4d6dd6a4a2e8a6f7d8863565 (diff)
Revert "PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock"
This reverts commit 11388c87d2abca1f01975ced28ce9eacea239104. The issue is that no wake lock is held at the user space i.e by Power Manager service.This is because the PowerManagerService fails to acquire the Wakelock.In 3.8 the wakelock module in the kernel expects the user process to have the capability of CAP_BLOCK_SUSPEND.Which the powermangersevice does not have. Bug 1274297 Bug 1384311 Change-Id: I3b696108d47278cf40abce8d5a9bd012f98f2925 Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com> (cherry picked from commit e8464e785027a15279a13e6e32cd1aecd22d5a00) Reviewed-on: http://git-master/r/282698 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/wakelock.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c
index 8f50de394d22..c8fba3380076 100644
--- a/kernel/power/wakelock.c
+++ b/kernel/power/wakelock.c
@@ -9,7 +9,6 @@
* manipulate wakelocks on Android.
*/
-#include <linux/capability.h>
#include <linux/ctype.h>
#include <linux/device.h>
#include <linux/err.h>
@@ -189,9 +188,6 @@ int pm_wake_lock(const char *buf)
size_t len;
int ret = 0;
- if (!capable(CAP_BLOCK_SUSPEND))
- return -EPERM;
-
while (*str && !isspace(*str))
str++;
@@ -235,9 +231,6 @@ int pm_wake_unlock(const char *buf)
size_t len;
int ret = 0;
- if (!capable(CAP_BLOCK_SUSPEND))
- return -EPERM;
-
len = strlen(buf);
if (!len)
return -EINVAL;