summaryrefslogtreecommitdiffstats
path: root/drivers/net/mv643xx_eth.c
diff options
context:
space:
mode:
authorBen Hutchings2010-12-09 13:10:25 +0100
committerDavid S. Miller2010-12-11 00:55:24 +0100
commited4ba4b5b96742d29225308ccccbdb1810b63064 (patch)
tree2c28a534d7b7fe4ed58925401d69b14df90323be /drivers/net/mv643xx_eth.c
parentethtool: Report link-down while interface is down (diff)
downloadkernel-qcow2-linux-ed4ba4b5b96742d29225308ccccbdb1810b63064.tar.gz
kernel-qcow2-linux-ed4ba4b5b96742d29225308ccccbdb1810b63064.tar.xz
kernel-qcow2-linux-ed4ba4b5b96742d29225308ccccbdb1810b63064.zip
netdev: Use default implementation of ethtool_ops::get_link where possible
Various drivers are using implementations of ethtool_ops::get_link that are equivalent to the default ethtool_op_get_link(). Change them to use that instead. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mv643xx_eth.c')
-rw-r--r--drivers/net/mv643xx_eth.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index dd2b6a71c6d7..ce31e74a559b 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1514,11 +1514,6 @@ static int mv643xx_eth_nway_reset(struct net_device *dev)
return genphy_restart_aneg(mp->phy);
}
-static u32 mv643xx_eth_get_link(struct net_device *dev)
-{
- return !!netif_carrier_ok(dev);
-}
-
static int
mv643xx_eth_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec)
{
@@ -1658,7 +1653,7 @@ static const struct ethtool_ops mv643xx_eth_ethtool_ops = {
.set_settings = mv643xx_eth_set_settings,
.get_drvinfo = mv643xx_eth_get_drvinfo,
.nway_reset = mv643xx_eth_nway_reset,
- .get_link = mv643xx_eth_get_link,
+ .get_link = ethtool_op_get_link,
.get_coalesce = mv643xx_eth_get_coalesce,
.set_coalesce = mv643xx_eth_set_coalesce,
.get_ringparam = mv643xx_eth_get_ringparam,