diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-03-07 07:12:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-18 19:19:45 -0400 |
commit | 6aad04f21374633bd8cecf25024553d1e11a9522 (patch) | |
tree | 9e3351e53b68d158b436a737049cbe2ee01ff126 /drivers/usb/serial/ti_usb_3410_5052.c | |
parent | 6982a398426a22166eaf049b79544536fdd6429f (diff) |
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.c | 7 |
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) | |||
1227 | { | 1227 | { |
1228 | int count, result; | 1228 | int count, result; |
1229 | struct usb_serial_port *port = tport->tp_port; | 1229 | struct usb_serial_port *port = tport->tp_port; |
1230 | struct tty_struct *tty = tty_port_tty_get(&port->port); /* FIXME */ | ||
1231 | unsigned long flags; | 1230 | unsigned long flags; |
1232 | 1231 | ||
1233 | spin_lock_irqsave(&tport->tp_lock, flags); | 1232 | spin_lock_irqsave(&tport->tp_lock, flags); |
@@ -1268,14 +1267,12 @@ static void ti_send(struct ti_port *tport) | |||
1268 | } | 1267 | } |
1269 | 1268 | ||
1270 | /* more room in the buffer for new writes, wakeup */ | 1269 | /* more room in the buffer for new writes, wakeup */ |
1271 | if (tty) | 1270 | tty_port_tty_wakeup(&port->port); |
1272 | tty_wakeup(tty); | 1271 | |
1273 | tty_kref_put(tty); | ||
1274 | wake_up_interruptible(&tport->tp_write_wait); | 1272 | wake_up_interruptible(&tport->tp_write_wait); |
1275 | return; | 1273 | return; |
1276 | unlock: | 1274 | unlock: |
1277 | spin_unlock_irqrestore(&tport->tp_lock, flags); | 1275 | spin_unlock_irqrestore(&tport->tp_lock, flags); |
1278 | tty_kref_put(tty); | ||
1279 | return; | 1276 | return; |
1280 | } | 1277 | } |
1281 | 1278 | ||