summaryrefslogtreecommitdiff
path: root/net/rfkill
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2008-07-22 14:17:37 +0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-01 15:31:33 -0400
commit7c4f4578fc85d42d149f86b47f76c28626a20d92 (patch)
tree266b617211d19f31d383b7b11a6d3dfe160676d1 /net/rfkill
parent6e28fbef0f330d7c1cade345eeae003d4e5d6070 (diff)
RFKILL: allow one to specify led trigger name
Allow the rfkill driver to specify led trigger name. By default it still defaults to the name of rfkill switch. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/rfkill')
-rw-r--r--net/rfkill/rfkill.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index c6f2f388cb72..5c24f3647189 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -589,7 +589,8 @@ static void rfkill_led_trigger_register(struct rfkill *rfkill)
#ifdef CONFIG_RFKILL_LEDS
int error;
- rfkill->led_trigger.name = rfkill->dev.bus_id;
+ if (!rfkill->led_trigger.name)
+ rfkill->led_trigger.name = rfkill->dev.bus_id;
error = led_trigger_register(&rfkill->led_trigger);
if (error)
rfkill->led_trigger.name = NULL;