Skip to content

Commit 8ef207d

Browse files
stephen hemmingerdavem330
authored andcommitted
iph: use default get_stats
This driver keeps stats in net_device stats therefore it does not need to define it's own get_stats hook. Also, use standard format for net_device_ops (without &). Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bff5527 commit 8ef207d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/net/usb/ipheth.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,6 @@ static void ipheth_tx_timeout(struct net_device *net)
409409
usb_unlink_urb(dev->tx_urb);
410410
}
411411

412-
static struct net_device_stats *ipheth_stats(struct net_device *net)
413-
{
414-
struct ipheth_device *dev = netdev_priv(net);
415-
return &dev->net->stats;
416-
}
417-
418412
static u32 ipheth_ethtool_op_get_link(struct net_device *net)
419413
{
420414
struct ipheth_device *dev = netdev_priv(net);
@@ -426,11 +420,10 @@ static struct ethtool_ops ops = {
426420
};
427421

428422
static const struct net_device_ops ipheth_netdev_ops = {
429-
.ndo_open = &ipheth_open,
430-
.ndo_stop = &ipheth_close,
431-
.ndo_start_xmit = &ipheth_tx,
432-
.ndo_tx_timeout = &ipheth_tx_timeout,
433-
.ndo_get_stats = &ipheth_stats,
423+
.ndo_open = ipheth_open,
424+
.ndo_stop = ipheth_close,
425+
.ndo_start_xmit = ipheth_tx,
426+
.ndo_tx_timeout = ipheth_tx_timeout,
434427
};
435428

436429
static int ipheth_probe(struct usb_interface *intf,

0 commit comments

Comments
 (0)