diff options
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index ff03331e0bcf..8dd2afa2fca8 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -185,13 +185,11 @@ static int kobil_startup (struct usb_serial *serial) | |||
185 | 185 | ||
186 | for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { | 186 | for (i = 0; i < altsetting->desc.bNumEndpoints; i++) { |
187 | endpoint = &altsetting->endpoint[i]; | 187 | endpoint = &altsetting->endpoint[i]; |
188 | if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) && | 188 | if (usb_endpoint_is_int_out(&endpoint->desc)) { |
189 | ((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
190 | dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress); | 189 | dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress); |
191 | priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress; | 190 | priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress; |
192 | } | 191 | } |
193 | if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) && | 192 | if (usb_endpoint_is_int_in(&endpoint->desc)) { |
194 | ((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
195 | dbg("%s Found interrupt in endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress); | 193 | dbg("%s Found interrupt in endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress); |
196 | priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress; | 194 | priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress; |
197 | } | 195 | } |