Commit 7c4f4578 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by John W. Linville

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: default avatarDmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6e28fbef
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment