From 094fd1f57e1613ddba517ce8f103ba5543ec3aa7 Mon Sep 17 00:00:00 2001 From: ockysaurus Date: Sun, 5 Jan 2020 20:46:09 +0100 Subject: [PATCH] Fix another mistake --- drivers/base/power/boeffla_wl_blocker.c | 8 +++++--- drivers/base/power/wakeup.c | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/base/power/boeffla_wl_blocker.c b/drivers/base/power/boeffla_wl_blocker.c index 5dadff855..e9c93ce97 100644 --- a/drivers/base/power/boeffla_wl_blocker.c +++ b/drivers/base/power/boeffla_wl_blocker.c @@ -35,8 +35,6 @@ #include #include #include - - #include "boeffla_wl_blocker.h" @@ -51,6 +49,7 @@ extern char list_wl_search[LENGTH_LIST_WL_SEARCH]; extern bool wl_blocker_active; extern bool wl_blocker_debug; + /*****************************************/ // internal functions /*****************************************/ @@ -68,7 +67,6 @@ static void build_search_string(char *list1, char *list2) } - /*****************************************/ // sysfs interface functions /*****************************************/ @@ -82,6 +80,7 @@ static ssize_t wakelock_blocker_show(struct device *dev, struct device_attribute } +// store list of user configured wakelocks static ssize_t wakelock_blocker_store(struct device * dev, struct device_attribute *attr, const char * buf, size_t n) { @@ -125,6 +124,7 @@ static ssize_t wakelock_blocker_default_store(struct device * dev, struct device return n; } + // show debug information of driver internals static ssize_t debug_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -133,6 +133,7 @@ static ssize_t debug_show(struct device *dev, struct device_attribute *attr, cha wl_blocker_debug, list_wl, list_wl_default, list_wl_search, wl_blocker_active); } + // store debug mode on/off (1/0) static ssize_t debug_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) @@ -168,6 +169,7 @@ static ssize_t version_show(struct device *dev, struct device_attribute *attr, c /*****************************************/ // define objects +static DEVICE_ATTR(wakelock_blocker, 0644, wakelock_blocker_show, wakelock_blocker_store); static DEVICE_ATTR(wakelock_blocker_default, 0644, wakelock_blocker_default_show, wakelock_blocker_default_store); static DEVICE_ATTR(debug, 0664, debug_show, debug_store); static DEVICE_ATTR(version, 0664, version_show, NULL); diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 48cd9ccb2..718b52059 100755 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -720,7 +720,6 @@ static bool check_for_block(struct wakeup_source *ws) if(strstr(list_wl_search, wakelock_name) == NULL) return false; - } // wake lock is in list, print it if debug mode on if (wl_blocker_debug)