From 92a19f9cec9a80ad93c06e115822deb729e2c6ad Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 3 Jan 2013 15:53:03 +0100 Subject: TTY: switch tty_insert_flip_char 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. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- drivers/isdn/i4l/isdn_common.c | 8 ++++---- drivers/isdn/i4l/isdn_tty.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/isdn') diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 7093169ee0c9..4a387ec021ad 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c @@ -913,7 +913,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) while ((count_pull < skb->len) && (len > 0)) { /* push every character but the last to the tty buffer directly */ if (count_put) - tty_insert_flip_char(tty, last, TTY_NORMAL); + tty_insert_flip_char(port, last, TTY_NORMAL); len--; if (dev->drv[di]->DLEflag & DLEmask) { last = DLE; @@ -953,16 +953,16 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) * Now we can dequeue it. */ if (cisco_hack) - tty_insert_flip_char(tty, last, 0xFF); + tty_insert_flip_char(port, last, 0xFF); else - tty_insert_flip_char(tty, last, TTY_NORMAL); + tty_insert_flip_char(port, last, TTY_NORMAL); #ifdef CONFIG_ISDN_AUDIO ISDN_AUDIO_SKB_LOCK(skb) = 0; #endif skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]); dev_kfree_skb(skb); } else { - tty_insert_flip_char(tty, last, TTY_NORMAL); + tty_insert_flip_char(port, last, TTY_NORMAL); /* Not yet emptied this buff, so it * must stay in the queue, for further calls * but we pull off the data we got until now. diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 4f5bcee7cf32..32d65d4bc848 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -92,11 +92,11 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb) unsigned char *dp = skb->data; while (--l) { if (*dp == DLE) - tty_insert_flip_char(tty, DLE, 0); - tty_insert_flip_char(tty, *dp++, 0); + tty_insert_flip_char(port, DLE, 0); + tty_insert_flip_char(port, *dp++, 0); } if (*dp == DLE) - tty_insert_flip_char(tty, DLE, 0); + tty_insert_flip_char(port, DLE, 0); last = *dp; } else { #endif @@ -107,9 +107,9 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb) } #endif if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP) - tty_insert_flip_char(tty, last, 0xFF); + tty_insert_flip_char(port, last, 0xFF); else - tty_insert_flip_char(tty, last, TTY_NORMAL); + tty_insert_flip_char(port, last, TTY_NORMAL); tty_flip_buffer_push(tty); kfree_skb(skb); @@ -2287,7 +2287,7 @@ isdn_tty_at_cout(char *msg, modem_info *info) if (skb) { *sp++ = c; } else { - if (tty_insert_flip_char(tty, c, TTY_NORMAL) == 0) + if (tty_insert_flip_char(port, c, TTY_NORMAL) == 0) break; } } -- cgit v1.2.3