aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/ldusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/ldusb.c')
-rw-r--r--drivers/usb/misc/ldusb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index cb4096201e29..48c166f0d764 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -721,7 +721,7 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
721 if (dev->interrupt_out_endpoint == NULL) 721 if (dev->interrupt_out_endpoint == NULL)
722 dev_warn(&intf->dev, "Interrupt out endpoint not found (using control endpoint instead)\n"); 722 dev_warn(&intf->dev, "Interrupt out endpoint not found (using control endpoint instead)\n");
723 723
724 dev->interrupt_in_endpoint_size = le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize); 724 dev->interrupt_in_endpoint_size = usb_endpoint_maxp(dev->interrupt_in_endpoint);
725 dev->ring_buffer = kmalloc(ring_buffer_size*(sizeof(size_t)+dev->interrupt_in_endpoint_size), GFP_KERNEL); 725 dev->ring_buffer = kmalloc(ring_buffer_size*(sizeof(size_t)+dev->interrupt_in_endpoint_size), GFP_KERNEL);
726 if (!dev->ring_buffer) { 726 if (!dev->ring_buffer) {
727 dev_err(&intf->dev, "Couldn't allocate ring_buffer\n"); 727 dev_err(&intf->dev, "Couldn't allocate ring_buffer\n");
@@ -737,7 +737,7 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id *
737 dev_err(&intf->dev, "Couldn't allocate interrupt_in_urb\n"); 737 dev_err(&intf->dev, "Couldn't allocate interrupt_in_urb\n");
738 goto error; 738 goto error;
739 } 739 }
740 dev->interrupt_out_endpoint_size = dev->interrupt_out_endpoint ? le16_to_cpu(dev->interrupt_out_endpoint->wMaxPacketSize) : 740 dev->interrupt_out_endpoint_size = dev->interrupt_out_endpoint ? usb_endpoint_maxp(dev->interrupt_out_endpoint) :
741 udev->descriptor.bMaxPacketSize0; 741 udev->descriptor.bMaxPacketSize0;
742 dev->interrupt_out_buffer = kmalloc(write_buffer_size*dev->interrupt_out_endpoint_size, GFP_KERNEL); 742 dev->interrupt_out_buffer = kmalloc(write_buffer_size*dev->interrupt_out_endpoint_size, GFP_KERNEL);
743 if (!dev->interrupt_out_buffer) { 743 if (!dev->interrupt_out_buffer) {