summaryrefslogtreecommitdiff
path: root/drivers/net/can/flexcan/flexcan-core.c
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>2022-07-27 19:49:39 +0900
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-07-27 13:09:01 +0200
commitb4b97079a49ec81fa2236fb2ebbba867fff5d4ba (patch)
tree8a7a335fbc871810cbcb322599f7d448eeee9330 /drivers/net/can/flexcan/flexcan-core.c
parent0ccb3e0b0a001c9de1e039bef43040351df9b8aa (diff)
can: flexcan: export flexcan_ethtool_ops and remove flexcan_set_ethtool_ops()
The function flexcan_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 flexcan_ethtool_ops so it becomes visible to flexcan-core.c. Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/all/20220727104939.279022-4-mailhol.vincent@wanadoo.fr Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/flexcan/flexcan-core.c')
-rw-r--r--drivers/net/can/flexcan/flexcan-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexcan/flexcan-core.c
index d060088047f1..f857968efed7 100644
--- a/drivers/net/can/flexcan/flexcan-core.c
+++ b/drivers/net/can/flexcan/flexcan-core.c
@@ -2113,7 +2113,7 @@ static int flexcan_probe(struct platform_device *pdev)
SET_NETDEV_DEV(dev, &pdev->dev);
dev->netdev_ops = &flexcan_netdev_ops;
- flexcan_set_ethtool_ops(dev);
+ dev->ethtool_ops = &flexcan_ethtool_ops;
dev->irq = irq;
dev->flags |= IFF_ECHO;