diff options
author | Dario Binacchi <dario.binacchi@amarulasolutions.com> | 2022-07-28 09:02:52 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-07-28 09:14:42 +0200 |
commit | 341c5724d7a1c71899752201dab88f87343c0c2b (patch) | |
tree | 7c4dbd20f73ec4075c4e2ed51515bf38eeaa6335 /drivers/net/can | |
parent | 0cef03b109ca671252cf00481eabc3032acb9d80 (diff) | |
download | linux-341c5724d7a1c71899752201dab88f87343c0c2b.tar.bz2 |
can: slcan: use the generic can_change_mtu()
It is useless to define a custom function that does nothing but always
return the same error code. Better to use the generic can_change_mtu()
function.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://lore.kernel.org/all/20220728070254.267974-6-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/slcan/slcan-core.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c index 3a4701d8e081..740d82d68ca4 100644 --- a/drivers/net/can/slcan/slcan-core.c +++ b/drivers/net/can/slcan/slcan-core.c @@ -743,16 +743,11 @@ cmd_transmit_failed: return err; } -static int slcan_netdev_change_mtu(struct net_device *dev, int new_mtu) -{ - return -EINVAL; -} - static const struct net_device_ops slcan_netdev_ops = { .ndo_open = slcan_netdev_open, .ndo_stop = slcan_netdev_close, .ndo_start_xmit = slcan_netdev_xmit, - .ndo_change_mtu = slcan_netdev_change_mtu, + .ndo_change_mtu = can_change_mtu, }; /****************************************** |