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>
This commit is contained in:
Dmitry Baryshkov 2008-07-22 14:17:37 +04:00 committed by John W. Linville
parent 6e28fbef0f
commit 7c4f4578fc
1 changed files with 2 additions and 1 deletions

View 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;