mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
USB: kobil_sct: Use usb_endpoint_* functions
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a7dc218b8f
commit
4f1f1ddd73
@ -185,13 +185,11 @@ static int kobil_startup (struct usb_serial *serial)
|
|||||||
|
|
||||||
for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
|
for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
|
||||||
endpoint = &altsetting->endpoint[i];
|
endpoint = &altsetting->endpoint[i];
|
||||||
if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) &&
|
if (usb_endpoint_is_int_out(&endpoint->desc)) {
|
||||||
((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
|
|
||||||
dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
|
dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
|
||||||
priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
|
priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
|
||||||
}
|
}
|
||||||
if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) &&
|
if (usb_endpoint_is_int_in(&endpoint->desc)) {
|
||||||
((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
|
|
||||||
dbg("%s Found interrupt in endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
|
dbg("%s Found interrupt in endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
|
||||||
priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
|
priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user