leds: core: Add led_set_brightness_nosleep{nopm} functions
authorJacek Anaszewski <j.anaszewski@samsung.com>
Wed, 7 Oct 2015 09:10:41 +0000 (11:10 +0200)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 4 Jan 2016 08:57:30 +0000 (09:57 +0100)
commit81fe8e5b73e3f4de578ac7f53c1d956d4f58b8d4
treeff084840f52a554f7a902c7e1ffe54416e4c452f
parent437a4240f26461610cc0d90950b1c88348d9babe
leds: core: Add led_set_brightness_nosleep{nopm} functions

This patch adds led_set_brightness_nosleep() and led_set_brightness_nopm()
functions, that guarantee setting LED brightness in a non-blocking way.
The latter is used from pm_ops context and doesn't modify the brightness
cached in the struct led_classdev. Its execution always ends up with
a call to brightness setting op - either directly or through
a set_brightness_work, regardless of LED_SUSPENDED flag state.

The patch also replaces led_set_brightness_async() with
led_set_brightness_nosleep() in all places where the most vital was setting
brightness in a non sleeping way but not necessarily asynchronously, which
is not needed for non-blocking drivers.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/leds/led-class.c
drivers/leds/led-core.c
drivers/leds/leds.h
drivers/leds/trigger/ledtrig-backlight.c
drivers/leds/trigger/ledtrig-default-on.c
drivers/leds/trigger/ledtrig-gpio.c
drivers/leds/trigger/ledtrig-heartbeat.c
drivers/leds/trigger/ledtrig-oneshot.c
drivers/leds/trigger/ledtrig-transient.c