aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-01-16 09:12:01 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 17:34:40 -0500
commit8143a8963c374116f84aba15dcaeaf02370c8098 (patch)
tree5dfc242477891472418b3a6e50c2776992400910 /drivers/usb/class
parent8457d99cab81e91724b43363f7fccd851d766187 (diff)
USB: cdc-wdm: kill the now unnecessary bMaxPacketSize0 field and udev variable
We don't need bMaxPacketSize0, and keeping all these different size fields around will only cause us to use the wrong one. Seems the udev variable was only used for getting bMaxPacketSize0. We could have used it for the usb_fill_*_urb() calls, but as it wasn't before - why start now? Instead make the interface_to_usbdev() calls consistent. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-wdm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 8909058b1bb1..bb8208a13a53 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -80,7 +80,6 @@ struct wdm_device {
80 u16 bufsize; 80 u16 bufsize;
81 u16 wMaxCommand; 81 u16 wMaxCommand;
82 u16 wMaxPacketSize; 82 u16 wMaxPacketSize;
83 u16 bMaxPacketSize0;
84 __le16 inum; 83 __le16 inum;
85 int reslength; 84 int reslength;
86 int length; 85 int length;
@@ -597,7 +596,6 @@ static void wdm_rxwork(struct work_struct *work)
597static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) 596static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
598{ 597{
599 int rv = -EINVAL; 598 int rv = -EINVAL;
600 struct usb_device *udev = interface_to_usbdev(intf);
601 struct wdm_device *desc; 599 struct wdm_device *desc;
602 struct usb_host_interface *iface; 600 struct usb_host_interface *iface;
603 struct usb_endpoint_descriptor *ep; 601 struct usb_endpoint_descriptor *ep;
@@ -657,7 +655,6 @@ next_desc:
657 goto err; 655 goto err;
658 656
659 desc->wMaxPacketSize = usb_endpoint_maxp(ep); 657 desc->wMaxPacketSize = usb_endpoint_maxp(ep);
660 desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0;
661 658
662 desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); 659 desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
663 if (!desc->orq) 660 if (!desc->orq)
@@ -709,7 +706,7 @@ next_desc:
709 706
710 usb_fill_control_urb( 707 usb_fill_control_urb(
711 desc->response, 708 desc->response,
712 interface_to_usbdev(desc->intf), 709 interface_to_usbdev(intf),
713 /* using common endpoint 0 */ 710 /* using common endpoint 0 */
714 usb_rcvctrlpipe(interface_to_usbdev(desc->intf), 0), 711 usb_rcvctrlpipe(interface_to_usbdev(desc->intf), 0),
715 (unsigned char *)desc->irq, 712 (unsigned char *)desc->irq,