kernel-fxtec-pro1x/drivers/leds/trigger
Martin Schiller f1fd9d0bfd leds: trigger: netdev: fix handling on interface rename
[ Upstream commit 5f820ed52371b4f5d8c43c93f03408d0dbc01e5b ]

The NETDEV_CHANGENAME code is not "unneeded" like it is stated in commit
4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface
rename").

The event was accidentally misinterpreted equivalent to
NETDEV_UNREGISTER, but should be equivalent to NETDEV_REGISTER.

This was the case in the original code from the openwrt project.

Otherwise, you are unable to set netdev led triggers for (non-existent)
netdevices, which has to be renamed. This is the case, for example, for
ppp interfaces in openwrt.

Fixes: 06f502f57d ("leds: trigger: Introduce a NETDEV trigger")
Fixes: 4cb6560514fa ("leds: trigger: netdev: fix refcnt leak on interface rename")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-17 20:35:54 +01:00
..
Kconfig leds: triggers: don't depend on LEDS_TRIGGERS twice 2018-06-28 21:34:44 +02:00
ledtrig-activity.c leds: activity trigger: simplifications from core changes 2018-07-05 23:21:14 +02:00
ledtrig-backlight.c leds: backlight trigger: simplifications from core changes 2018-07-05 23:21:14 +02:00
ledtrig-camera.c leds: triggers: make the MODULE_LICENSE string match the actual license 2018-07-05 22:59:36 +02:00
ledtrig-cpu.c leds/trigger/cpu: Add LED trigger for all CPUs aggregated 2017-03-06 22:06:47 +01:00
ledtrig-default-on.c leds: default-on trigger: make use of module_led_trigger() 2018-07-05 23:21:14 +02:00
ledtrig-disk.c leds: Extends disk trigger for reads and writes 2018-03-11 20:01:55 +01:00
ledtrig-gpio.c leds: gpio trigger: simplifications from core changes 2018-07-05 23:21:15 +02:00
ledtrig-heartbeat.c leds: heartbeat trigger: simplifications from core changes 2018-07-05 23:21:13 +02:00
ledtrig-mtd.c leds: trigger: Introduce a MTD (NAND/NOR) trigger 2016-04-13 10:23:14 +02:00
ledtrig-netdev.c leds: trigger: netdev: fix handling on interface rename 2019-12-17 20:35:54 +01:00
ledtrig-oneshot.c leds: oneshot trigger: simplifications from core changes 2018-07-05 23:21:13 +02:00
ledtrig-panic.c leds: triggers: Allow to switch the trigger to "panic" on a kernel panic 2016-05-06 10:22:09 +02:00
ledtrig-timer.c leds: timer trigger: simplifications from core changes 2018-07-05 23:21:12 +02:00
ledtrig-transient.c leds: transient trigger: simplifications from core changes 2018-07-05 23:21:12 +02:00
Makefile leds: trigger: Introduce a NETDEV trigger 2018-01-08 21:28:11 +01:00