Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH net-next] iph: use default get_stats
Date: Wed, 8 Jun 2011 11:09:13 -0700	[thread overview]
Message-ID: <20110608110913.54becfba@nehalam.ftrdhcpuser.net> (raw)

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 <shemminger@vyatta.com>


--- a/drivers/net/usb/ipheth.c	2011-05-12 08:39:09.000000000 -0700
+++ b/drivers/net/usb/ipheth.c	2011-06-08 11:03:50.011606145 -0700
@@ -409,12 +409,6 @@ static void ipheth_tx_timeout(struct net
 	usb_unlink_urb(dev->tx_urb);
 }
 
-static struct net_device_stats *ipheth_stats(struct net_device *net)
-{
-	struct ipheth_device *dev = netdev_priv(net);
-	return &dev->net->stats;
-}
-
 static u32 ipheth_ethtool_op_get_link(struct net_device *net)
 {
 	struct ipheth_device *dev = netdev_priv(net);
@@ -426,11 +420,10 @@ static struct ethtool_ops ops = {
 };
 
 static const struct net_device_ops ipheth_netdev_ops = {
-	.ndo_open = &ipheth_open,
-	.ndo_stop = &ipheth_close,
-	.ndo_start_xmit = &ipheth_tx,
-	.ndo_tx_timeout = &ipheth_tx_timeout,
-	.ndo_get_stats = &ipheth_stats,
+	.ndo_open = ipheth_open,
+	.ndo_stop = ipheth_close,
+	.ndo_start_xmit = ipheth_tx,
+	.ndo_tx_timeout = ipheth_tx_timeout,
 };
 
 static int ipheth_probe(struct usb_interface *intf,

             reply	other threads:[~2011-06-08 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 18:09 Stephen Hemminger [this message]
2011-06-09  0:06 ` [PATCH net-next] iph: use default get_stats David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110608110913.54becfba@nehalam.ftrdhcpuser.net \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox