From: Fabio Baltieri Date: Wed, 6 Jun 2012 19:12:34 +0000 (+0800) Subject: leds: fix led_brightness_set when soft-blinking X-Git-Tag: v3.6-rc1~76^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=437864828d82b9dee50b5741106fbf5fa12b139a;p=pandora-kernel.git leds: fix led_brightness_set when soft-blinking Move led_stop_software_blink() code into led_brightness_set() to ensure software blink timer is stopped and cleared when changing trigger. Also use led_set_brightness() instead of calling led_cdev->brightness_set() directly to keep led_cdev->brightness consistent with current LED status. This ensure proper cleaning when changing triggers, as without this fix a LED may be turned off while leaving it's led_cdev->brightness = 1, leading to an erratic software-blink behaviour. The problem was easy to reproduce by changing the trigger from "timer" to "oneshot". Signed-off-by: Fabio Baltieri Signed-off-by: Bryan Wu --- Reading git-diff-tree failed