]> git.itanic.dy.fi Git - linux-stable/commitdiff
USB: cdc-acm: fix pipe type of write endpoint
authorMing Lei <ming.lei@canonical.com>
Tue, 16 Oct 2012 13:21:21 +0000 (21:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:02:12 +0000 (10:02 -0700)
commit c5211187f7ff8e8dbff4ebf7c011ac4c0ffe319c upstream.

If the write endpoint is interrupt type, usb_sndintpipe() should
be passed to usb_fill_int_urb() instead of usb_sndbulkpipe().

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c

index 3b2ce7d06e8a8553719387a2f378c106762bdcee..e4eee296594da91a9843c43d0a74224d8a8f8543 100644 (file)
@@ -1172,7 +1172,7 @@ static int acm_probe(struct usb_interface *intf,
 
                if (usb_endpoint_xfer_int(epwrite))
                        usb_fill_int_urb(snd->urb, usb_dev,
-                               usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
+                               usb_sndintpipe(usb_dev, epwrite->bEndpointAddress),
                                NULL, acm->writesize, acm_write_bulk, snd, epwrite->bInterval);
                else
                        usb_fill_bulk_urb(snd->urb, usb_dev,