aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/Kconfig2
-rw-r--r--drivers/usb/class/cdc-acm.c13
2 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
index 2519e320098f..316aac8e4ca1 100644
--- a/drivers/usb/class/Kconfig
+++ b/drivers/usb/class/Kconfig
@@ -6,7 +6,7 @@ comment "USB Device Class drivers"
6 6
7config USB_ACM 7config USB_ACM
8 tristate "USB Modem (CDC ACM) support" 8 tristate "USB Modem (CDC ACM) support"
9 depends on USB 9 depends on USB && TTY
10 ---help--- 10 ---help---
11 This driver supports USB modems and ISDN adapters which support the 11 This driver supports USB modems and ISDN adapters which support the
12 Communication Device Class Abstract Control Model interface. 12 Communication Device Class Abstract Control Model interface.
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 2d92cce260d7..8ac25adf31b4 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -410,19 +410,12 @@ static int acm_submit_read_urbs(struct acm *acm, gfp_t mem_flags)
410 410
411static void acm_process_read_urb(struct acm *acm, struct urb *urb) 411static void acm_process_read_urb(struct acm *acm, struct urb *urb)
412{ 412{
413 struct tty_struct *tty;
414
415 if (!urb->actual_length) 413 if (!urb->actual_length)
416 return; 414 return;
417 415
418 tty = tty_port_tty_get(&acm->port); 416 tty_insert_flip_string(&acm->port, urb->transfer_buffer,
419 if (!tty) 417 urb->actual_length);
420 return; 418 tty_flip_buffer_push(&acm->port);
421
422 tty_insert_flip_string(tty, urb->transfer_buffer, urb->actual_length);
423 tty_flip_buffer_push(tty);
424
425 tty_kref_put(tty);
426} 419}
427 420
428static void acm_read_bulk_callback(struct urb *urb) 421static void acm_read_bulk_callback(struct urb *urb)