aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pxa168_eth.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-12-09 07:10:25 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-10 18:55:24 -0500
commited4ba4b5b96742d29225308ccccbdb1810b63064 (patch)
tree2c28a534d7b7fe4ed58925401d69b14df90323be /drivers/net/pxa168_eth.c
parente596e6e4d578f2639416e620d367a3af34814a40 (diff)
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/pxa168_eth.c')
-rw-r--r--drivers/net/pxa168_eth.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
index 18c0297743f1..04ed27d0b6be 100644
--- a/drivers/net/pxa168_eth.c
+++ b/drivers/net/pxa168_eth.c
@@ -1450,16 +1450,11 @@ static void pxa168_get_drvinfo(struct net_device *dev,
1450 strncpy(info->bus_info, "N/A", 32); 1450 strncpy(info->bus_info, "N/A", 32);
1451} 1451}
1452 1452
1453static u32 pxa168_get_link(struct net_device *dev)
1454{
1455 return !!netif_carrier_ok(dev);
1456}
1457
1458static const struct ethtool_ops pxa168_ethtool_ops = { 1453static const struct ethtool_ops pxa168_ethtool_ops = {
1459 .get_settings = pxa168_get_settings, 1454 .get_settings = pxa168_get_settings,
1460 .set_settings = pxa168_set_settings, 1455 .set_settings = pxa168_set_settings,
1461 .get_drvinfo = pxa168_get_drvinfo, 1456 .get_drvinfo = pxa168_get_drvinfo,
1462 .get_link = pxa168_get_link, 1457 .get_link = ethtool_op_get_link,
1463}; 1458};
1464 1459
1465static const struct net_device_ops pxa168_eth_netdev_ops = { 1460static const struct net_device_ops pxa168_eth_netdev_ops = {