From: Stephen Hemminger Date: Fri, 20 Mar 2009 19:35:59 +0000 (+0000) Subject: usbnet: convert rndis driver to use dev_get_stats X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b5556498b60a237cca173dfd60109f3504ce25ca;p=linux-2.6-omap-h63xx.git usbnet: convert rndis driver to use dev_get_stats dev_get_stats() handles all issues with net_device_ops Signed-off-by: Stephen Hemminger Acked-by: David Brownell Signed-off-by: David S. Miller --- diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c index d2860a82368..2b4660e08c4 100644 --- a/drivers/usb/gadget/rndis.c +++ b/drivers/usb/gadget/rndis.c @@ -170,7 +170,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, int i, count; rndis_query_cmplt_type *resp; struct net_device *net; - struct net_device_stats *stats; + const struct net_device_stats *stats; if (!r) return -ENOMEM; resp = (rndis_query_cmplt_type *) r->buf; @@ -193,10 +193,7 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len, resp->InformationBufferOffset = cpu_to_le32 (16); net = rndis_per_dev_params[configNr].dev; - if (net->get_stats) - stats = net->get_stats(net); - else - stats = NULL; + stats = dev_get_stats(net); switch (OID) {