mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
[PATCH] USB: fix Bug in usb-skeleton.c
Compare endpoint address to USB_ENDPOINT_DIR_MASK to determine endpoint direction... From: "Conger, Chris A." <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3eb0c5f4b5
commit
6b216df87c
1 changed files with 4 additions and 2 deletions
|
|
@ -257,7 +257,8 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
|
|||
endpoint = &iface_desc->endpoint[i].desc;
|
||||
|
||||
if (!dev->bulk_in_endpointAddr &&
|
||||
(endpoint->bEndpointAddress & USB_DIR_IN) &&
|
||||
((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
|
||||
== USB_DIR_IN) &&
|
||||
((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
||||
== USB_ENDPOINT_XFER_BULK)) {
|
||||
/* we found a bulk in endpoint */
|
||||
|
|
@ -272,7 +273,8 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
|
|||
}
|
||||
|
||||
if (!dev->bulk_out_endpointAddr &&
|
||||
!(endpoint->bEndpointAddress & USB_DIR_OUT) &&
|
||||
((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
|
||||
== USB_DIR_OUT) &&
|
||||
((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
||||
== USB_ENDPOINT_XFER_BULK)) {
|
||||
/* we found a bulk out endpoint */
|
||||
|
|
|
|||
Loading…
Reference in a new issue