summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/ti_usb_3410_5052.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-03-07 16:12:29 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-19 03:19:45 +0400
commit6aad04f21374633bd8cecf25024553d1e11a9522 (patch)
tree9e3351e53b68d158b436a737049cbe2ee01ff126 /drivers/usb/serial/ti_usb_3410_5052.c
parent6982a398426a22166eaf049b79544536fdd6429f (diff)
downloadlinux-6aad04f21374633bd8cecf25024553d1e11a9522.tar.xz
TTY: add tty_port_tty_wakeup helper
It allows for cleaning up on a considerable amount of places. They did port_get, wakeup, kref_put. Now the only thing needed is to call tty_port_tty_wakeup which does exactly that. One exception is ifx6x60 where tty_wakeup was open-coded. We now call tty_wakeup properly there. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 39cb9b807c3c..437f2d579cde 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -1227,7 +1227,6 @@ static void ti_send(struct ti_port *tport)
{
int count, result;
struct usb_serial_port *port = tport->tp_port;
- struct tty_struct *tty = tty_port_tty_get(&port->port); /* FIXME */
unsigned long flags;
spin_lock_irqsave(&tport->tp_lock, flags);
@@ -1268,14 +1267,12 @@ static void ti_send(struct ti_port *tport)
}
/* more room in the buffer for new writes, wakeup */
- if (tty)
- tty_wakeup(tty);
- tty_kref_put(tty);
+ tty_port_tty_wakeup(&port->port);
+
wake_up_interruptible(&tport->tp_write_wait);
return;
unlock:
spin_unlock_irqrestore(&tport->tp_lock, flags);
- tty_kref_put(tty);
return;
}