diff options
author | Conger, Chris A <CHRIS.A.CONGER@saic.com> | 2005-07-29 21:18:23 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 22:12:54 +0200 |
commit | 6b216df87cb5f3bb7d47a33f1cd955ebc7b84dfd (patch) | |
tree | 47be6973ba2f07151b742f49f1c859ed8a6bd901 /drivers/usb/usb-skeleton.c | |
parent | [PATCH] USB: add S3C24XX USB Host driver support (diff) | |
download | linux-6b216df87cb5f3bb7d47a33f1cd955ebc7b84dfd.tar.xz linux-6b216df87cb5f3bb7d47a33f1cd955ebc7b84dfd.zip |
[PATCH] USB: fix Bug in usb-skeleton.c
Compare endpoint address to USB_ENDPOINT_DIR_MASK to determine endpoint
direction...
From: "Conger, Chris A." <CHRIS.A.CONGER@saic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/usb-skeleton.c')
-rw-r--r-- | drivers/usb/usb-skeleton.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c index 6051a646fe69..353f24d45bc1 100644 --- a/drivers/usb/usb-skeleton.c +++ b/drivers/usb/usb-skeleton.c @@ -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 */ |