diff options
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 7 | ||||
-rw-r--r-- | drivers/usb/class/cdc-acm.h | 2 | ||||
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 2 | ||||
-rw-r--r-- | drivers/usb/class/usbtmc.c | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index f492a7f2b6ee..e057e5381465 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -297,6 +297,8 @@ static void acm_ctrl_irq(struct urb *urb) | |||
297 | if (!ACM_READY(acm)) | 297 | if (!ACM_READY(acm)) |
298 | goto exit; | 298 | goto exit; |
299 | 299 | ||
300 | usb_mark_last_busy(acm->dev); | ||
301 | |||
300 | data = (unsigned char *)(dr + 1); | 302 | data = (unsigned char *)(dr + 1); |
301 | switch (dr->bNotificationType) { | 303 | switch (dr->bNotificationType) { |
302 | case USB_CDC_NOTIFY_NETWORK_CONNECTION: | 304 | case USB_CDC_NOTIFY_NETWORK_CONNECTION: |
@@ -336,7 +338,6 @@ static void acm_ctrl_irq(struct urb *urb) | |||
336 | break; | 338 | break; |
337 | } | 339 | } |
338 | exit: | 340 | exit: |
339 | usb_mark_last_busy(acm->dev); | ||
340 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 341 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
341 | if (retval) | 342 | if (retval) |
342 | dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with " | 343 | dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with " |
@@ -533,6 +534,8 @@ static void acm_softint(struct work_struct *work) | |||
533 | if (!ACM_READY(acm)) | 534 | if (!ACM_READY(acm)) |
534 | return; | 535 | return; |
535 | tty = tty_port_tty_get(&acm->port); | 536 | tty = tty_port_tty_get(&acm->port); |
537 | if (!tty) | ||
538 | return; | ||
536 | tty_wakeup(tty); | 539 | tty_wakeup(tty); |
537 | tty_kref_put(tty); | 540 | tty_kref_put(tty); |
538 | } | 541 | } |
@@ -646,8 +649,10 @@ static void acm_port_down(struct acm *acm) | |||
646 | usb_kill_urb(acm->ctrlurb); | 649 | usb_kill_urb(acm->ctrlurb); |
647 | for (i = 0; i < ACM_NW; i++) | 650 | for (i = 0; i < ACM_NW; i++) |
648 | usb_kill_urb(acm->wb[i].urb); | 651 | usb_kill_urb(acm->wb[i].urb); |
652 | tasklet_disable(&acm->urb_task); | ||
649 | for (i = 0; i < nr; i++) | 653 | for (i = 0; i < nr; i++) |
650 | usb_kill_urb(acm->ru[i].urb); | 654 | usb_kill_urb(acm->ru[i].urb); |
655 | tasklet_enable(&acm->urb_task); | ||
651 | acm->control->needs_remote_wakeup = 0; | 656 | acm->control->needs_remote_wakeup = 0; |
652 | usb_autopm_put_interface(acm->control); | 657 | usb_autopm_put_interface(acm->control); |
653 | } | 658 | } |
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 5eeb570b9a61..b4ea54dbf323 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h | |||
@@ -52,7 +52,7 @@ | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | /* | 54 | /* |
55 | * The only reason to have several buffers is to accomodate assumptions | 55 | * The only reason to have several buffers is to accommodate assumptions |
56 | * in line disciplines. They ask for empty space amount, receive our URB size, | 56 | * in line disciplines. They ask for empty space amount, receive our URB size, |
57 | * and proceed to issue several 1-character writes, assuming they will fit. | 57 | * and proceed to issue several 1-character writes, assuming they will fit. |
58 | * The very first write takes a complete URB. Fortunately, this only happens | 58 | * The very first write takes a complete URB. Fortunately, this only happens |
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 47085e5879ab..a97c018dd419 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -281,7 +281,7 @@ static void cleanup(struct wdm_device *desc) | |||
281 | desc->sbuf, | 281 | desc->sbuf, |
282 | desc->validity->transfer_dma); | 282 | desc->validity->transfer_dma); |
283 | usb_free_coherent(interface_to_usbdev(desc->intf), | 283 | usb_free_coherent(interface_to_usbdev(desc->intf), |
284 | desc->wMaxCommand, | 284 | desc->bMaxPacketSize0, |
285 | desc->inbuf, | 285 | desc->inbuf, |
286 | desc->response->transfer_dma); | 286 | desc->response->transfer_dma); |
287 | kfree(desc->orq); | 287 | kfree(desc->orq); |
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 6a54634ab823..385acb895ab3 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
@@ -483,7 +483,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf, | |||
483 | } | 483 | } |
484 | 484 | ||
485 | done += n_characters; | 485 | done += n_characters; |
486 | /* Terminate if end-of-message bit recieved from device */ | 486 | /* Terminate if end-of-message bit received from device */ |
487 | if ((buffer[8] & 0x01) && (actual >= n_characters + 12)) | 487 | if ((buffer[8] & 0x01) && (actual >= n_characters + 12)) |
488 | remaining = 0; | 488 | remaining = 0; |
489 | else | 489 | else |