[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 9 Sep 2013 18:01:19 +0200
From: Paul Chavent <Paul.Chavent@...ra.fr>
To: linux-usb@...r.kernel.org, gregkh@...uxfoundation.org,
jhovold@...il.com, fschaefer.oss@...glemail.com, jslaby@...e.cz,
max@...e.de, giometti@...eenne.com
Cc: linux-kernel@...r.kernel.org, Paul Chavent <Paul.Chavent@...ra.fr>
Subject: [PATCH 4/5] USB : serial : invoke dcd_change ldisc's handler.
In order to have the PPS line discipline to work with usb devices.
Signed-off-by: Paul Chavent <paul.chavent@...ra.fr>
---
drivers/usb/serial/generic.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 91f0592..a18a086 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -567,6 +567,13 @@ void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port,
{
struct tty_port *port = &usb_port->port;
struct tty_struct *tty = tty_port_tty_get(port);
+ struct tty_ldisc *ld = tty ? tty_ldisc_ref(tty) : NULL;
+
+ if (ld) {
+ if (ld->ops->dcd_change)
+ ld->ops->dcd_change(tty, status);
+ tty_ldisc_deref(ld);
+ }
dev_dbg(&usb_port->dev, "%s - status %d\n", __func__, status);
--
1.7.12.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists