From 7622c71e8e291035b8be881889a3abeab7719fa7 Mon Sep 17 00:00:00 2001 From: Evan Wilson Date: Mon, 4 Apr 2016 21:25:52 -0700 Subject: Deny permission for the "bluetooth_timer" wake lock. This wake lock is abused by our Bluetooth stack, so we don't want to allow it Change-Id: Ia6d315ba877131f3323eb5ee615450397b057f2d --- kernel/power/wakelock.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kernel/power/wakelock.c') diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c index ee83a3c5047..4fd55503e00 100644 --- a/kernel/power/wakelock.c +++ b/kernel/power/wakelock.c @@ -18,8 +18,11 @@ #include #include +#define BAD_WAKELOCK "bluetooth_timer" + static DEFINE_MUTEX(wakelocks_lock); + struct wakelock { char *name; struct rb_node node; @@ -194,6 +197,11 @@ int pm_wake_lock(const char *buf) printk ("OLIO %s error return 1, lock %s\n", __FUNCTION__, buf); return -EPERM; } +#elif 1 /* OLIO The bluetooth stack abuses this wake lock, so don't allow it to lock */ + if (strncmp(buf, BAD_WAKELOCK, strlen(BAD_WAKELOCK)) == 0) { + printk ("OLIO %s error return 1, lock %s\n", __FUNCTION__, buf); + return -EPERM; + } #endif while (*str && !isspace(*str)) -- cgit v1.2.3-70-g09d2