diff options
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index ff03331e0bcf..237289920f03 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 | } |
@@ -355,8 +353,7 @@ static void kobil_close (struct usb_serial_port *port, struct file *filp) | |||
355 | usb_free_urb( port->write_urb ); | 353 | usb_free_urb( port->write_urb ); |
356 | port->write_urb = NULL; | 354 | port->write_urb = NULL; |
357 | } | 355 | } |
358 | if (port->interrupt_in_urb) | 356 | usb_kill_urb(port->interrupt_in_urb); |
359 | usb_kill_urb(port->interrupt_in_urb); | ||
360 | } | 357 | } |
361 | 358 | ||
362 | 359 | ||