aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index c13f6e747748..d66148a17fe3 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -628,7 +628,6 @@ static void sierra_instat_callback(struct urb *urb)
628 unsigned char signals = *((unsigned char *) 628 unsigned char signals = *((unsigned char *)
629 urb->transfer_buffer + 629 urb->transfer_buffer +
630 sizeof(struct usb_ctrlrequest)); 630 sizeof(struct usb_ctrlrequest));
631 struct tty_struct *tty;
632 631
633 dev_dbg(&port->dev, "%s: signal x%x\n", __func__, 632 dev_dbg(&port->dev, "%s: signal x%x\n", __func__,
634 signals); 633 signals);
@@ -639,11 +638,8 @@ static void sierra_instat_callback(struct urb *urb)
639 portdata->dsr_state = ((signals & 0x02) ? 1 : 0); 638 portdata->dsr_state = ((signals & 0x02) ? 1 : 0);
640 portdata->ri_state = ((signals & 0x08) ? 1 : 0); 639 portdata->ri_state = ((signals & 0x08) ? 1 : 0);
641 640
642 tty = tty_port_tty_get(&port->port); 641 if (old_dcd_state && !portdata->dcd_state)
643 if (tty && !C_CLOCAL(tty) && 642 tty_port_tty_hangup(&port->port, true);
644 old_dcd_state && !portdata->dcd_state)
645 tty_hangup(tty);
646 tty_kref_put(tty);
647 } else { 643 } else {
648 dev_dbg(&port->dev, "%s: type %x req %x\n", 644 dev_dbg(&port->dev, "%s: type %x req %x\n",
649 __func__, req_pkt->bRequestType, 645 __func__, req_pkt->bRequestType,