diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:23:21 -0500 |
commit | c96e2c92072d3e78954c961f53d8c7352f7abbd7 (patch) | |
tree | d844f26f926ff40e98e9eae0e11fd71acad81df4 /drivers/usb/storage/usb.c | |
parent | f2aca47dc3c2d0c2d5dbd972558557e74232bbce (diff) | |
parent | 64358164f5bfe5e11d4040c1eb674c29e1436ce5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (70 commits)
USB: remove duplicate device id from zc0301
USB: remove duplicate device id from usb_storage
USB: remove duplicate device id from keyspan
USB: remove duplicate device id from ftdi_sio
USB: remove duplicate device id from visor
USB: a bit more coding style cleanup
usbcore: trivial whitespace fixes
usb-storage: use first bulk endpoints, not last
EHCI: fix interrupt-driven remote wakeup
USB: switch ehci-hcd to new polling scheme
USB: autosuspend for usb printer driver
USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products
USB: Sierra Wireless auto set D0
USB: usb ethernet gadget recognizes HUSB2DEV
USB: list atmel husb2_udc gadget controller
USB: gadgetfs AIO tweaks
USB: gadgetfs behaves better on userspace init bug
USB: gadgetfs race fix
USB: gadgetfs simplifications
USB: gadgetfs cleanups
...
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r-- | drivers/usb/storage/usb.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 70644506651f..7e7ec29782f1 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -731,26 +731,27 @@ static int get_pipes(struct us_data *us) | |||
731 | struct usb_endpoint_descriptor *ep_int = NULL; | 731 | struct usb_endpoint_descriptor *ep_int = NULL; |
732 | 732 | ||
733 | /* | 733 | /* |
734 | * Find the endpoints we need. | 734 | * Find the first endpoint of each type we need. |
735 | * We are expecting a minimum of 2 endpoints - in and out (bulk). | 735 | * We are expecting a minimum of 2 endpoints - in and out (bulk). |
736 | * An optional interrupt is OK (necessary for CBI protocol). | 736 | * An optional interrupt-in is OK (necessary for CBI protocol). |
737 | * We will ignore any others. | 737 | * We will ignore any others. |
738 | */ | 738 | */ |
739 | for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { | 739 | for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { |
740 | ep = &altsetting->endpoint[i].desc; | 740 | ep = &altsetting->endpoint[i].desc; |
741 | 741 | ||
742 | /* Is it a BULK endpoint? */ | ||
743 | if (usb_endpoint_xfer_bulk(ep)) { | 742 | if (usb_endpoint_xfer_bulk(ep)) { |
744 | /* BULK in or out? */ | 743 | if (usb_endpoint_dir_in(ep)) { |
745 | if (usb_endpoint_dir_in(ep)) | 744 | if (!ep_in) |
746 | ep_in = ep; | 745 | ep_in = ep; |
747 | else | 746 | } else { |
748 | ep_out = ep; | 747 | if (!ep_out) |
748 | ep_out = ep; | ||
749 | } | ||
749 | } | 750 | } |
750 | 751 | ||
751 | /* Is it an interrupt endpoint? */ | 752 | else if (usb_endpoint_is_int_in(ep)) { |
752 | else if (usb_endpoint_xfer_int(ep)) { | 753 | if (!ep_int) |
753 | ep_int = ep; | 754 | ep_int = ep; |
754 | } | 755 | } |
755 | } | 756 | } |
756 | 757 | ||