can: c_can: ethtool: use default drvinfo
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 12 Jan 2022 20:34:41 +0000 (21:34 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 24 Feb 2022 07:26:04 +0000 (08:26 +0100)
The ethtool core implements a default drvinfo.

There's no need to replicate this in the driver, no additional
information is added, so remove this and rely on the default.

Link: https://lore.kernel.org/all/20220124215642.3474154-10-mkl@pengutronix.de
Cc: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can_ethtool.c

index 6655146294fcdc3c8dc6ffc266dfa1c99c000def..8a826a6813bd223e25ac7695a36ed680bd1c62a0 100644 (file)
 
 #include "c_can.h"
 
-static void c_can_get_drvinfo(struct net_device *netdev,
-                             struct ethtool_drvinfo *info)
-{
-       struct c_can_priv *priv = netdev_priv(netdev);
-       strscpy(info->driver, "c_can", sizeof(info->driver));
-       strscpy(info->bus_info, dev_name(priv->device), sizeof(info->bus_info));
-}
-
 static void c_can_get_ringparam(struct net_device *netdev,
                                struct ethtool_ringparam *ring,
                                struct kernel_ethtool_ringparam *kernel_ring,
@@ -33,7 +25,6 @@ static void c_can_get_ringparam(struct net_device *netdev,
 }
 
 static const struct ethtool_ops c_can_ethtool_ops = {
-       .get_drvinfo = c_can_get_drvinfo,
        .get_ringparam = c_can_get_ringparam,
 };