File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 28
28
#include <linux/serial.h>
29
29
#include <linux/tty_driver.h>
30
30
#include <linux/tty_flip.h>
31
+ #include <linux/tty_ldisc.h>
31
32
#include <linux/module.h>
32
33
#include <linux/mutex.h>
33
34
#include <linux/uaccess.h>
@@ -324,8 +325,17 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
324
325
325
326
if (difference & USB_CDC_SERIAL_STATE_DSR )
326
327
acm -> iocount .dsr ++ ;
327
- if (difference & USB_CDC_SERIAL_STATE_DCD )
328
+ if (difference & USB_CDC_SERIAL_STATE_DCD ) {
329
+ if (acm -> port .tty ) {
330
+ struct tty_ldisc * ld = tty_ldisc_ref (acm -> port .tty );
331
+ if (ld ) {
332
+ if (ld -> ops -> dcd_change )
333
+ ld -> ops -> dcd_change (acm -> port .tty , newctrl & USB_CDC_SERIAL_STATE_DCD );
334
+ tty_ldisc_deref (ld );
335
+ }
336
+ }
328
337
acm -> iocount .dcd ++ ;
338
+ }
329
339
if (newctrl & USB_CDC_SERIAL_STATE_BREAK ) {
330
340
acm -> iocount .brk ++ ;
331
341
tty_insert_flip_char (& acm -> port , 0 , TTY_BREAK );
You can’t perform that action at this time.
0 commit comments