diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2015-10-19 09:04:01 +0200 |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-01-04 09:57:30 +0100 |
commit | 1afcadfcd184c3b52e38bae15c247a5fa4a0e054 (patch) | |
tree | 6e94c39adb855e8309f97a7d79fbad19bcffda96 /drivers/leds/leds.h | |
parent | leds: core: Add led_set_brightness_nosleep{nopm} functions (diff) | |
download | linux-1afcadfcd184c3b52e38bae15c247a5fa4a0e054.tar.xz linux-1afcadfcd184c3b52e38bae15c247a5fa4a0e054.zip |
leds: core: Use set_brightness_work for the blocking op
This patch makes LED core capable of setting brightness for drivers
that implement brightness_set_blocking op. It removes from LED class
drivers responsibility for using work queues on their own.
In order to achieve this set_brightness_delayed callback is being
modified to directly call one of available ops for brightness setting.
led_set_brightness_async() function didn't set brightness in an
asynchronous way in all cases. It was mistakenly assuming that all
LED subsystem drivers used work queue in their brightness_set op,
whereas only half of them did that. Since it has no users now,
it is being removed.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r-- | drivers/leds/leds.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index 8e252a2f8662..683a605fd33c 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -16,16 +16,6 @@ #include <linux/rwsem.h> #include <linux/leds.h> -static inline void led_set_brightness_async(struct led_classdev *led_cdev, - enum led_brightness value) -{ - value = min(value, led_cdev->max_brightness); - led_cdev->brightness = value; - - if (!(led_cdev->flags & LED_SUSPENDED)) - led_cdev->brightness_set(led_cdev, value); -} - static inline int led_set_brightness_sync(struct led_classdev *led_cdev, enum led_brightness value) { |