summary refs log tree commit diff
path: root/drivers/tty/ehv_bytechan.c
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/tty/ehv_bytechan.c
parent6982a398426a22166eaf049b79544536fdd6429f (diff)
downloadlinux-6aad04f21374633bd8cecf25024553d1e11a9522.tar.gz
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/tty/ehv_bytechan.c')
-rw-r--r--drivers/tty/ehv_bytechan.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index ed92622b8949..6d0c27cd03da 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -472,13 +472,9 @@ static void ehv_bc_tx_dequeue(struct ehv_bc_data *bc)
 static irqreturn_t ehv_bc_tty_tx_isr(int irq, void *data)
 {
 	struct ehv_bc_data *bc = data;
-	struct tty_struct *ttys = tty_port_tty_get(&bc->port);
 
 	ehv_bc_tx_dequeue(bc);
-	if (ttys) {
-		tty_wakeup(ttys);
-		tty_kref_put(ttys);
-	}
+	tty_port_tty_wakeup(&bc->port);
 
 	return IRQ_HANDLED;
 }