aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bmac.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-08-17 05:31:15 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-17 05:31:15 -0400
commit01414802054c382072b6cb9a1bdc6e243c74b2d5 (patch)
treef09b05eb9fff16a69d83ec28653992d1bae8d74c /drivers/net/bmac.c
parentbb8a10bbd10a45db0eb45bac520489bdbc0917ef (diff)
ethtool: Provide a default implementation of ethtool_ops::get_drvinfo
The driver name and bus address for a net_device can normally be found through the driver model now. Instead of requiring drivers to provide this information redundantly through the ethtool_ops::get_drvinfo operation, use the driver model to do so if the driver does not define the operation. Since ETHTOOL_GDRVINFO no longer requires the driver to implement any operations, do not require net_device::ethtool_ops to be set either. Remove implementations of get_drvinfo and ethtool_ops that provide only this information. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bmac.c')
-rw-r--r--drivers/net/bmac.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 959add2410bf..9322699bb31c 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1233,15 +1233,8 @@ static void bmac_reset_and_enable(struct net_device *dev)
1233 } 1233 }
1234 spin_unlock_irqrestore(&bp->lock, flags); 1234 spin_unlock_irqrestore(&bp->lock, flags);
1235} 1235}
1236static void bmac_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
1237{
1238 struct bmac_data *bp = netdev_priv(dev);
1239 strcpy(info->driver, "bmac");
1240 strcpy(info->bus_info, dev_name(&bp->mdev->ofdev.dev));
1241}
1242 1236
1243static const struct ethtool_ops bmac_ethtool_ops = { 1237static const struct ethtool_ops bmac_ethtool_ops = {
1244 .get_drvinfo = bmac_get_drvinfo,
1245 .get_link = ethtool_op_get_link, 1238 .get_link = ethtool_op_get_link,
1246}; 1239};
1247 1240