From 4d71a4a12b130ad033219e6f58c74a64059415eb Mon Sep 17 00:00:00 2001 From: Jacek Anaszewski Date: Fri, 14 Nov 2014 02:50:18 -0800 Subject: leds: Add support for setting brightness in a synchronous way There are use cases when setting a LED brightness has to have immediate effect (e.g. setting a torch LED brightness). This patch extends LED subsystem to support such operations. The LED subsystem internal API __led_set_brightness is changed to led_set_brightness_async and new led_set_brightness_sync API is added. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Richard Purdie Signed-off-by: Bryan Wu --- drivers/leds/trigger/ledtrig-heartbeat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/leds/trigger/ledtrig-heartbeat.c') diff --git a/drivers/leds/trigger/ledtrig-heartbeat.c b/drivers/leds/trigger/ledtrig-heartbeat.c index 5c8464a33172..fea6871d2609 100644 --- a/drivers/leds/trigger/ledtrig-heartbeat.c +++ b/drivers/leds/trigger/ledtrig-heartbeat.c @@ -74,7 +74,7 @@ static void led_heartbeat_function(unsigned long data) break; } - __led_set_brightness(led_cdev, brightness); + led_set_brightness_async(led_cdev, brightness); mod_timer(&heartbeat_data->timer, jiffies + delay); } -- cgit v1.2.3