Commit 41b29f86 authored by spiiroin's avatar spiiroin

[usb-moded] Silence wakelock related logging in normal builds

Having possibility to log wakelocking activity is useful in some special
circumstance, but it creates a lot of noise and usb-moded is lacking fine
tuned logging control.

Disable wakelock logging altogether by default.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent b846d873
......@@ -59,6 +59,11 @@
#include "usb_moded-dsme.h"
#endif
/* Wakelogging is noisy, do not log it by default */
#ifndef VERBOSE_WAKELOCKING
# define VERBOSE_WAKELOCKING 0
#endif
/* global definitions */
static int usb_moded_exitcode = EXIT_FAILURE;
......@@ -978,7 +983,9 @@ void acquire_wakelock(const char *wakelock_name)
USB_MODED_SUSPEND_DELAY_MAXIMUM_MS * 1000000LL);
write_to_sysfs_file("/sys/power/wake_lock", buff);
#if VERBOSE_WAKELOCKING
log_debug("acquire_wakelock %s", wakelock_name);
#endif
}
/** Release wakelock via sysfs
......@@ -987,7 +994,9 @@ void acquire_wakelock(const char *wakelock_name)
*/
void release_wakelock(const char *wakelock_name)
{
#if VERBOSE_WAKELOCKING
log_debug("release_wakelock %s", wakelock_name);
#endif
write_to_sysfs_file("/sys/power/wake_unlock", wakelock_name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment