aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/fwserial
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-03-07 13:12:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-18 16:19:45 -0700
commit6aad04f21374633bd8cecf25024553d1e11a9522 (patch)
tree9e3351e53b68d158b436a737049cbe2ee01ff126 /drivers/staging/fwserial
parent6982a398426a22166eaf049b79544536fdd6429f (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/staging/fwserial')
-rw-r--r--drivers/staging/fwserial/fwserial.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 5a6fb44f38a..5c64e3a35b2 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -744,7 +744,6 @@ static void fwtty_tx_complete(struct fw_card *card, int rcode,
struct fwtty_transaction *txn)
{
struct fwtty_port *port = txn->port;
- struct tty_struct *tty;
int len;
fwtty_dbg(port, "rcode: %d", rcode);
@@ -769,13 +768,8 @@ static void fwtty_tx_complete(struct fw_card *card, int rcode,
port->stats.dropped += txn->dma_pended.len;
}
- if (len < WAKEUP_CHARS) {
- tty = tty_port_tty_get(&port->port);
- if (tty) {
- tty_wakeup(tty);
- tty_kref_put(tty);
- }
- }
+ if (len < WAKEUP_CHARS)
+ tty_port_tty_wakeup(&port->port);
}
static int fwtty_tx(struct fwtty_port *port, bool drain)