leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting
authorJacek Anaszewski <j.anaszewski@samsung.com>
Wed, 7 Oct 2015 09:10:43 +0000 (11:10 +0200)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 4 Jan 2016 08:57:31 +0000 (09:57 +0100)
commit13ae79bbe4c214047f51623304d83b46eb02897d
tree8dcbaf1fef57d97dfe78a35f07a84a8b85180122
parent1afcadfcd184c3b52e38bae15c247a5fa4a0e054
leds: core: Drivers shouldn't enforce SYNC/ASYNC brightness setting

This patch removes SET_BRIGHTNESS_ASYNC and SET_BRIGHTNESS_SYNC flags.
led_set_brightness() now calls led_set_brightness_nosleep() instead of
choosing between sync and async op basing on the flags defined by the
driver.

From now on, if a user wants to make sure that brightness will be set
synchronously, they have to use led_set_brightness_sync() API. It is now
being made publicly available since it has become apparent that it is
a caller who should decide whether brightness is to be set in
a synchronous or an asynchronous way.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/leds/led-class-flash.c
drivers/leds/led-class.c
drivers/leds/led-core.c
drivers/leds/leds.h
include/linux/leds.h