summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Wilson <evan@oliodevices.com>2016-02-18 05:04:50 +0000
committerGerrit Code Review <gerrit2@ip-172-31-25-77.us-west-1.compute.internal>2015-04-16 10:08:13 +0000
commit0c87e3a91a4a642f41b0e68e9c7d4ebe03c99246 (patch)
treed4836a297bf20cbc0c4e99d9fd85f67861abb72f
parentb2503a5c905f153564d2ff6c99ba9bd8dc32575c (diff)
parent8eb9e51a418796811b552ee3cf7958b84df01b01 (diff)
downloadolio-linux-3.10-0c87e3a91a4a642f41b0e68e9c7d4ebe03c99246.tar.xz
olio-linux-3.10-0c87e3a91a4a642f41b0e68e9c7d4ebe03c99246.zip
Merge "At Olio, where we don't allow outside applications, anything that tries to set a wakelock is allowed to do so. We remove the permission checks since they return incorrect values." into android-3.10-bringup
-rw-r--r--kernel/power/wakelock.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c
index 8f50de394d2..ee83a3c5047 100644
--- a/kernel/power/wakelock.c
+++ b/kernel/power/wakelock.c
@@ -189,21 +189,26 @@ int pm_wake_lock(const char *buf)
size_t len;
int ret = 0;
- if (!capable(CAP_BLOCK_SUSPEND))
+#if 0 /* OLIO our watch is entirely controlled by us, no need for this */
+ if (!capable(CAP_BLOCK_SUSPEND)) {
+ printk ("OLIO %s error return 1, lock %s\n", __FUNCTION__, buf);
return -EPERM;
+ }
+#endif
while (*str && !isspace(*str))
str++;
len = str - buf;
- if (!len)
+ if (!len) {
return -EINVAL;
-
+ }
if (*str && *str != '\n') {
/* Find out if there's a valid timeout string appended. */
ret = kstrtou64(skip_spaces(str), 10, &timeout_ns);
- if (ret)
+ if (ret) {
return -EINVAL;
+ }
}
mutex_lock(&wakelocks_lock);
@@ -235,8 +240,10 @@ int pm_wake_unlock(const char *buf)
size_t len;
int ret = 0;
+#if 0 /* OLIO our watch is entirely controlled by us, no need for this */
if (!capable(CAP_BLOCK_SUSPEND))
return -EPERM;
+#endif
len = strlen(buf);
if (!len)