summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino2006-10-26 18:02:54 +0200
committerGreg Kroah-Hartman2006-12-01 23:23:28 +0100
commit240661c55646401df64411e04ba5833c411c42bc (patch)
treef99cb8742f88c46b348d38d1457df067bf099bd1 /drivers/usb
parentUSB: kobil_sct: Use usb_endpoint_* functions (diff)
downloadkernel-qcow2-linux-240661c55646401df64411e04ba5833c411c42bc.tar.gz
kernel-qcow2-linux-240661c55646401df64411e04ba5833c411c42bc.tar.xz
kernel-qcow2-linux-240661c55646401df64411e04ba5833c411c42bc.zip
USB: legousbtower: Use usb_endpoint_* functions
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/misc/legousbtower.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index 27089497e717..f8611997bd77 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -898,14 +898,11 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc;
- if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) &&
- ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
- dev->interrupt_in_endpoint = endpoint;
- }
-
- if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) &&
- ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
- dev->interrupt_out_endpoint = endpoint;
+ if (usb_endpoint_xfer_int(endpoint)) {
+ if (usb_endpoint_dir_in(endpoint))
+ dev->interrupt_in_endpoint = endpoint;
+ else
+ dev->interrupt_out_endpoint = endpoint;
}
}
if(dev->interrupt_in_endpoint == NULL) {