[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1383301021-16613-4-git-send-email-bjorn@mork.no>
Date: Fri, 1 Nov 2013 11:16:40 +0100
From: Bjørn Mork <bjorn@...k.no>
To: netdev@...r.kernel.org
Cc: linux-usb@...r.kernel.org,
Alexey Orishko <alexey.orishko@...il.com>,
Bjørn Mork <bjorn@...k.no>
Subject: [PATCH net-next 03/24] net: cdc_ncm: remove redundant "intf" field
This is always a duplicate of the "control" field. It causes
confusion wrt intf_data updates and cleanups.
Cc: Alexey Orishko <alexey.orishko@...il.com>
Signed-off-by: Bjørn Mork <bjorn@...k.no>
---
drivers/net/usb/cdc_ncm.c | 4 +---
include/linux/usb/cdc_ncm.h | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 38566bf..bfab879 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -382,7 +382,6 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
len = intf->cur_altsetting->extralen;
ctx->udev = dev->udev;
- ctx->intf = intf;
/* parse through descriptors associated with control interface */
while ((len > 0) && (buf[0] > 2) && (buf[0] <= len)) {
@@ -489,7 +488,6 @@ advance:
usb_set_intfdata(ctx->data, dev);
usb_set_intfdata(ctx->control, dev);
- usb_set_intfdata(ctx->intf, dev);
if (ctx->ether_desc) {
temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress);
@@ -562,7 +560,7 @@ void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf)
ctx->control = NULL;
}
- usb_set_intfdata(ctx->intf, NULL);
+ usb_set_intfdata(intf, NULL);
cdc_ncm_free(ctx);
}
EXPORT_SYMBOL_GPL(cdc_ncm_unbind);
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h
index 89f0bbc..c14e00f 100644
--- a/include/linux/usb/cdc_ncm.h
+++ b/include/linux/usb/cdc_ncm.h
@@ -103,7 +103,6 @@ struct cdc_ncm_ctx {
struct usb_host_endpoint *in_ep;
struct usb_host_endpoint *out_ep;
struct usb_host_endpoint *status_ep;
- struct usb_interface *intf;
struct usb_interface *control;
struct usb_interface *data;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists