From 603446cc7a9d537cc12806e6cedf2d2cd1b2ffe1 Mon Sep 17 00:00:00 2001 From: Ziyan Date: Sun, 10 May 2015 23:19:53 +0200 Subject: tuna: vibrator: remove unnecessary logging - don't log sysfs reads - make pwm value change log message clearer - only log vibrator events in dynamic debug mode --- arch/arm/mach-omap2/board-tuna-vibrator.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-tuna-vibrator.c b/arch/arm/mach-omap2/board-tuna-vibrator.c index c9d3055..c9e6d30 100755 --- a/arch/arm/mach-omap2/board-tuna-vibrator.c +++ b/arch/arm/mach-omap2/board-tuna-vibrator.c @@ -48,12 +48,7 @@ static struct vibrator { static ssize_t pwmvalue_show(struct device *dev, struct device_attribute *attr, char *buf) { - int count; - - count = sprintf(buf, "%lu\n", pwmval); - pr_info("vibrator: pwmval: %lu\n", pwmval); - - return count; + return sprintf(buf, "%lu\n", pwmval); } ssize_t pwmvalue_store(struct device *dev, @@ -63,7 +58,7 @@ ssize_t pwmvalue_store(struct device *dev, if (kstrtoul(buf, 0, &pwmval)) pr_err("vibrator: error in storing pwm value\n"); - pr_info("vibrator: pwmval: %lu\n", pwmval); + pr_info("vibrator: pwmval set to %lu\n", pwmval); return size; } @@ -163,7 +158,7 @@ static void vibrator_enable(struct timed_output_dev *dev, int value) hrtimer_cancel(&vibdata.timer); if (value) { - pr_info("vibrator: value=%d, pwmval=%lu\n", value, pwmval); + pr_debug("vibrator: value=%d, pwmval=%lu\n", value, pwmval); wake_lock(&vibdata.wklock); vibrator_timer_init(); gpio_set_value(vibdata.gpio_en, 1); -- cgit v1.1