]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
RFKILL: allow one to specify led trigger name
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Tue, 22 Jul 2008 10:17:37 +0000 (14:17 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 1 Aug 2008 19:31:33 +0000 (15:31 -0400)
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>
net/rfkill/rfkill.c

index c6f2f388cb72e24a51e4abdc3ac0ffcfa238a71c..5c24f36471894f7fa7a14da2757c517d5afe3076 100644 (file)
@@ -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;