提交 2ae7745b 编写于 作者: L Luiz Fernando N. Capitulino 提交者: Greg Kroah-Hartman

USB: ftdi-elan: Use usb_endpoint_* functions

Signed-off-by: NLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 87ad46c9
...@@ -2633,10 +2633,7 @@ static int ftdi_elan_probe(struct usb_interface *interface, ...@@ -2633,10 +2633,7 @@ static int ftdi_elan_probe(struct usb_interface *interface,
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc; endpoint = &iface_desc->endpoint[i].desc;
if (!ftdi->bulk_in_endpointAddr && if (!ftdi->bulk_in_endpointAddr &&
((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) usb_endpoint_is_bulk_in(endpoint)) {
== USB_DIR_IN) && ((endpoint->bmAttributes &
USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK))
{
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
ftdi->bulk_in_size = buffer_size; ftdi->bulk_in_size = buffer_size;
ftdi->bulk_in_endpointAddr = endpoint->bEndpointAddress; ftdi->bulk_in_endpointAddr = endpoint->bEndpointAddress;
...@@ -2649,10 +2646,7 @@ static int ftdi_elan_probe(struct usb_interface *interface, ...@@ -2649,10 +2646,7 @@ static int ftdi_elan_probe(struct usb_interface *interface,
} }
} }
if (!ftdi->bulk_out_endpointAddr && if (!ftdi->bulk_out_endpointAddr &&
((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) usb_endpoint_is_bulk_out(endpoint)) {
== USB_DIR_OUT) && ((endpoint->bmAttributes &
USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK))
{
ftdi->bulk_out_endpointAddr = ftdi->bulk_out_endpointAddr =
endpoint->bEndpointAddress; endpoint->bEndpointAddress;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册