提交 7c4f4578 编写于 作者: D Dmitry Baryshkov 提交者: 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: NDmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册