From: Dmitry Baryshkov Date: Tue, 22 Jul 2008 10:17:37 +0000 (+0400) Subject: RFKILL: allow one to specify led trigger name X-Git-Tag: v2.6.27-rc2~2^2~24^2~17 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c4f4578fc85d42d149f86b47f76c28626a20d92;p=linux-2.6 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 Acked-by: Henrique de Moraes Holschuh Acked-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index c6f2f388cb..5c24f36471 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;