diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-07-02 22:05:21 +0200 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2018-07-05 23:21:10 +0200 |
commit | 2282e125a406e09331c5a785e3df29035c99a607 (patch) | |
tree | b5936ee2bde7c85bf71aaff259026857b2bda6d9 /drivers/leds/trigger/ledtrig-default-on.c | |
parent | leds: triggers: make the MODULE_LICENSE string match the actual license (diff) | |
download | linux-2282e125a406e09331c5a785e3df29035c99a607.tar.xz linux-2282e125a406e09331c5a785e3df29035c99a607.zip |
leds: triggers: let struct led_trigger::activate() return an error code
Given that activating a trigger can fail, let the callback return an
indication. This prevents to have a trigger active according to the
"trigger" sysfs attribute but not functional.
All users are changed accordingly to return 0 for now. There is no intended
change in behaviour.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'drivers/leds/trigger/ledtrig-default-on.c')
-rw-r--r-- | drivers/leds/trigger/ledtrig-default-on.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/leds/trigger/ledtrig-default-on.c b/drivers/leds/trigger/ledtrig-default-on.c index 4ccea04b7a6b..2996fe672198 100644 --- a/drivers/leds/trigger/ledtrig-default-on.c +++ b/drivers/leds/trigger/ledtrig-default-on.c @@ -16,9 +16,10 @@ #include <linux/leds.h> #include "../leds.h" -static void defon_trig_activate(struct led_classdev *led_cdev) +static int defon_trig_activate(struct led_classdev *led_cdev) { led_set_brightness_nosleep(led_cdev, led_cdev->max_brightness); + return 0; } static struct led_trigger defon_led_trigger = { |