提交 c6384560 编写于 作者: R Rasmus Villemoes 提交者: Marc Kleine-Budde

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: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
Acked-by: NWillem de Bruijn <willemb@google.com>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 d86afb89
......@@ -1249,6 +1249,8 @@ int register_candev(struct net_device *dev)
return -EINVAL;
dev->rtnl_link_ops = &can_link_ops;
netif_carrier_off(dev);
return register_netdev(dev);
}
EXPORT_SYMBOL_GPL(register_candev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册