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>
This commit is contained in:
@@ -316,10 +316,6 @@ int led_classdev_flash_register(struct device *parent,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Setting a torch brightness needs to have immediate effect */
|
||||
led_cdev->flags &= ~SET_BRIGHTNESS_ASYNC;
|
||||
led_cdev->flags |= SET_BRIGHTNESS_SYNC;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(led_classdev_flash_register);
|
||||
|
Reference in New Issue
Block a user