From: Greg Kroah-Hartman Date: Tue, 24 Mar 2015 19:47:24 +0000 (+0100) Subject: greybus: es1: allow the debug log to be stopped X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=25d1c37798cd298d726dfb114f0dcaa15824b138;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: es1: allow the debug log to be stopped If you write 0 to the debugfs file, the log will stop being updated. Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/es1.c b/drivers/staging/greybus/es1.c index 53d2d470e593..8aad4fbe25e6 100644 --- a/drivers/staging/greybus/es1.c +++ b/drivers/staging/greybus/es1.c @@ -592,14 +592,12 @@ static ssize_t apb1_log_enable_write(struct file *f, const char __user *buf, if (retval) return retval; - if (enable) { + if (enable) usb_log_enable(es1); - retval = count; - } else { - retval = -EINVAL; - } + else + usb_log_disable(es1); - return retval; + return count; } static const struct file_operations apb1_log_enable_fops = {