]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
can: only rename enabled led triggers when changing the netdev name
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 27 May 2014 11:30:56 +0000 (13:30 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 27 May 2014 13:05:41 +0000 (15:05 +0200)
commit45fb4f8d81578e0a17c45c4593a3305afbf7a48b
tree9e2fcd359d83a23613b55585e909e4f66f473dca
parent8646224cdb945eca4293e2131e5be47930ce3e80
can: only rename enabled led triggers when changing the netdev name

Commit a1ef7bd9fce8 ("can: rename LED trigger name on netdev renames") renames
the led trigger names according to the changed netdevice name.

As not every CAN driver supports and initializes the led triggers, checking for
the CAN private datastructure with safe_candev_priv() in the notifier chain is
not enough.

This patch adds a check when CONFIG_CAN_LEDS is enabled and the driver does not
support led triggers.

For stable 3.9+

Cc: Fabio Baltieri <fabio.baltieri@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/led.c