mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 22:10:24 +00:00
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:
parent
6e28fbef0f
commit
7c4f4578fc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user