summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/ftdi-elan.c
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>2006-10-26 13:02:50 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:23:28 -0800
commit2ae7745beac6de54a47ed19fe441f1d45aa96172 (patch)
treebf1613324cc4c8703bb92a154aa1e427f21c0920 /drivers/usb/misc/ftdi-elan.c
parent87ad46c94ec74f1750764c12744410ed524f9900 (diff)
downloadlwn-2ae7745beac6de54a47ed19fe441f1d45aa96172.tar.gz
lwn-2ae7745beac6de54a47ed19fe441f1d45aa96172.zip
USB: ftdi-elan: 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/misc/ftdi-elan.c')
-rw-r--r--drivers/usb/misc/ftdi-elan.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index 9b591b8b9369..0e8ee2dea881 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -2633,10 +2633,7 @@ static int ftdi_elan_probe(struct usb_interface *interface,
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc;
if (!ftdi->bulk_in_endpointAddr &&
- ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
- == USB_DIR_IN) && ((endpoint->bmAttributes &
- USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK))
- {
+ usb_endpoint_is_bulk_in(endpoint)) {
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
ftdi->bulk_in_size = buffer_size;
ftdi->bulk_in_endpointAddr = endpoint->bEndpointAddress;
@@ -2649,10 +2646,7 @@ static int ftdi_elan_probe(struct usb_interface *interface,
}
}
if (!ftdi->bulk_out_endpointAddr &&
- ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
- == USB_DIR_OUT) && ((endpoint->bmAttributes &
- USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK))
- {
+ usb_endpoint_is_bulk_out(endpoint)) {
ftdi->bulk_out_endpointAddr =
endpoint->bEndpointAddress;
}