]> git.baikalelectronics.ru Git - kernel.git/commit
can: dev: call netif_carrier_off() in register_candev()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 24 Jun 2019 08:34:13 +0000 (08:34 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Jul 2019 09:06:39 +0000 (11:06 +0200)
commit2c4cf03102827f043ba37f2644d59cd55d70d491
tree603f129d616baab646d7d218f1b1515ac9f39697
parent9426839deb7e3bb63cecdcf9465cf0daf8229ff3
can: dev: call netif_carrier_off() in register_candev()

CONFIG_CAN_LEDS is deprecated. When trying to use the generic netdev
trigger as suggested, there's a small inconsistency with the link
property: The LED is on initially, stays on when the device is brought
up, and then turns off (as expected) when the device is brought down.

Make sure the LED always reflects the state of the CAN device.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c