summaryrefslogtreecommitdiff
path: root/drivers/net/can/c_can/c_can_main.c
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>2022-07-27 19:49:38 +0900
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-07-27 13:09:01 +0200
commit0ccb3e0b0a001c9de1e039bef43040351df9b8aa (patch)
tree91cdde6ca25bcc3963a89b534517340200ea3b06 /drivers/net/can/c_can/c_can_main.c
parent1851532fd39c674906f83b431650c73e065c4a77 (diff)
can: c_can: export c_can_ethtool_ops and remove c_can_set_ethtool_ops()
The function c_can_set_ethtool_ops() does one thing: populate net_device::ethtool_ops. Instead, it is possible to directly assign this field and remove one function call and slightly reduce the object size. To do so, export c_can_ethtool_ops so it becomes visible to c_can_main.c. Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20220727104939.279022-3-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/c_can/c_can_main.c')
-rw-r--r--drivers/net/can/c_can/c_can_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/c_can/c_can_main.c b/drivers/net/can/c_can/c_can_main.c
index de38d8f7b5f7..dc8132862f33 100644
--- a/drivers/net/can/c_can/c_can_main.c
+++ b/drivers/net/can/c_can/c_can_main.c
@@ -1364,7 +1364,7 @@ int register_c_can_dev(struct net_device *dev)
dev->flags |= IFF_ECHO; /* we support local echo */
dev->netdev_ops = &c_can_netdev_ops;
- c_can_set_ethtool_ops(dev);
+ dev->ethtool_ops = &c_can_ethtool_ops;
return register_candev(dev);
}