summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)