diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2015-10-07 11:10:43 +0200 |
---|---|---|
committer | Jacek Anaszewski <j.anaszewski@samsung.com> | 2016-01-04 09:57:31 +0100 |
commit | 13ae79bbe4c214047f51623304d83b46eb02897d (patch) | |
tree | 8dcbaf1fef57d97dfe78a35f07a84a8b85180122 /drivers/leds/leds.h | |
parent | 1afcadfcd184c3b52e38bae15c247a5fa4a0e054 (diff) | |
download | op-kernel-dev-13ae79bbe4c214047f51623304d83b46eb02897d.zip op-kernel-dev-13ae79bbe4c214047f51623304d83b46eb02897d.tar.gz |
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>
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r-- | drivers/leds/leds.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index 683a605..db3f20d 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -16,19 +16,6 @@ #include <linux/rwsem.h> #include <linux/leds.h> -static inline int led_set_brightness_sync(struct led_classdev *led_cdev, - enum led_brightness value) -{ - int ret = 0; - - led_cdev->brightness = min(value, led_cdev->max_brightness); - - if (!(led_cdev->flags & LED_SUSPENDED)) - ret = led_cdev->brightness_set_blocking(led_cdev, - led_cdev->brightness); - return ret; -} - static inline int led_get_brightness(struct led_classdev *led_cdev) { return led_cdev->brightness; |