summaryrefslogtreecommitdiffstats
path: root/net/rfkill
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2018-07-02 22:05:21 +0200
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2018-07-05 23:21:10 +0200
commit2282e125a406e09331c5a785e3df29035c99a607 (patch)
treeb5936ee2bde7c85bf71aaff259026857b2bda6d9 /net/rfkill
parent033692eb3ec8305f6e9998b297aaec6899680637 (diff)
downloadlinux-2282e125a406e09331c5a785e3df29035c99a607.tar.bz2
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 'net/rfkill')
-rw-r--r--net/rfkill/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index a7a4e6ff9be2..1355f5ca8d22 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -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)