usb-storage: use first bulk endpoints, not last

According to the Bulk-Only spec, usb-storage is supposed to use the
_first_ bulk-in and bulk-out endpoints it finds, not the _last_.  And
while we're at it, we ought to test the direction of the interrupt
endpoint as well.  This patch (as842) makes both changes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

1 file changed