aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/nozomi.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-01-03 09:53:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 01:30:15 -0500
commit2e124b4a390ca85325fae75764bef92f0547fa25 (patch)
tree5519fbcdbe954e79b271ea6d31ac5a4dc754c4f5 /drivers/tty/nozomi.c
parentd6c53c0e9bd0a83f9f9ddbc9fd80141a54d83896 (diff)
TTY: switch tty_flip_buffer_push
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. Now, the one where most of tty_port_tty_get gets removed: tty_flip_buffer_push. IOW we also closed all the races in drivers not using tty_port_tty_get at all yet. Also we move tty_flip_buffer_push declaration from include/linux/tty.h to include/linux/tty_flip.h to all others while we are changing it anyway. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/nozomi.c')
-rw-r--r--drivers/tty/nozomi.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index 941fe8060ea5..afdd7732d925 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1272,15 +1272,11 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id)
1272 1272
1273exit_handler: 1273exit_handler:
1274 spin_unlock(&dc->spin_mutex); 1274 spin_unlock(&dc->spin_mutex);
1275 for (a = 0; a < NOZOMI_MAX_PORTS; a++) { 1275
1276 struct tty_struct *tty; 1276 for (a = 0; a < NOZOMI_MAX_PORTS; a++)
1277 if (test_and_clear_bit(a, &dc->flip)) { 1277 if (test_and_clear_bit(a, &dc->flip))
1278 tty = tty_port_tty_get(&dc->port[a].port); 1278 tty_flip_buffer_push(&dc->port[a].port);
1279 if (tty) 1279
1280 tty_flip_buffer_push(tty);
1281 tty_kref_put(tty);
1282 }
1283 }
1284 return IRQ_HANDLED; 1280 return IRQ_HANDLED;
1285none: 1281none:
1286 spin_unlock(&dc->spin_mutex); 1282 spin_unlock(&dc->spin_mutex);