mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
033692eb3e
commit
2282e125a4
16 changed files with 101 additions and 45 deletions
|
@ -141,13 +141,15 @@ static void rfkill_led_trigger_event(struct rfkill *rfkill)
|
|||
led_trigger_event(trigger, LED_FULL);
|
||||
}
|
||||
|
||||
static void rfkill_led_trigger_activate(struct led_classdev *led)
|
||||
static int rfkill_led_trigger_activate(struct led_classdev *led)
|
||||
{
|
||||
struct rfkill *rfkill;
|
||||
|
||||
rfkill = container_of(led->trigger, struct rfkill, led_trigger);
|
||||
|
||||
rfkill_led_trigger_event(rfkill);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *rfkill_get_led_trigger_name(struct rfkill *rfkill)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue