diff options
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 5b15d9d8896b..2bfc41ece0e1 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm) | |||
387 | struct acm_ru *rcv; | 387 | struct acm_ru *rcv; |
388 | unsigned long flags; | 388 | unsigned long flags; |
389 | unsigned char throttled; | 389 | unsigned char throttled; |
390 | struct usb_host_endpoint *ep; | ||
391 | 390 | ||
392 | dbg("Entering acm_rx_tasklet"); | 391 | dbg("Entering acm_rx_tasklet"); |
393 | 392 | ||
@@ -463,14 +462,12 @@ urbs: | |||
463 | 462 | ||
464 | rcv->buffer = buf; | 463 | rcv->buffer = buf; |
465 | 464 | ||
466 | ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out) | 465 | if (acm->is_int_ep) |
467 | [usb_pipeendpoint(acm->rx_endpoint)]; | ||
468 | if (usb_endpoint_xfer_int(&ep->desc)) | ||
469 | usb_fill_int_urb(rcv->urb, acm->dev, | 466 | usb_fill_int_urb(rcv->urb, acm->dev, |
470 | acm->rx_endpoint, | 467 | acm->rx_endpoint, |
471 | buf->base, | 468 | buf->base, |
472 | acm->readsize, | 469 | acm->readsize, |
473 | acm_read_bulk, rcv, ep->desc.bInterval); | 470 | acm_read_bulk, rcv, acm->bInterval); |
474 | else | 471 | else |
475 | usb_fill_bulk_urb(rcv->urb, acm->dev, | 472 | usb_fill_bulk_urb(rcv->urb, acm->dev, |
476 | acm->rx_endpoint, | 473 | acm->rx_endpoint, |
@@ -750,7 +747,7 @@ static int acm_tty_chars_in_buffer(struct tty_struct *tty) | |||
750 | { | 747 | { |
751 | struct acm *acm = tty->driver_data; | 748 | struct acm *acm = tty->driver_data; |
752 | if (!ACM_READY(acm)) | 749 | if (!ACM_READY(acm)) |
753 | return -EINVAL; | 750 | return 0; |
754 | /* | 751 | /* |
755 | * This is inaccurate (overcounts), but it works. | 752 | * This is inaccurate (overcounts), but it works. |
756 | */ | 753 | */ |
@@ -1183,6 +1180,9 @@ made_compressed_probe: | |||
1183 | spin_lock_init(&acm->read_lock); | 1180 | spin_lock_init(&acm->read_lock); |
1184 | mutex_init(&acm->mutex); | 1181 | mutex_init(&acm->mutex); |
1185 | acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress); | 1182 | acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress); |
1183 | acm->is_int_ep = usb_endpoint_xfer_int(epread); | ||
1184 | if (acm->is_int_ep) | ||
1185 | acm->bInterval = epread->bInterval; | ||
1186 | tty_port_init(&acm->port); | 1186 | tty_port_init(&acm->port); |
1187 | acm->port.ops = &acm_port_ops; | 1187 | acm->port.ops = &acm_port_ops; |
1188 | 1188 | ||