aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-01-03 09:53:03 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 01:21:36 -0500
commit92a19f9cec9a80ad93c06e115822deb729e2c6ad (patch)
tree80e1550ac1647a1cdf20a0b568554c0c50a63f75 /drivers/isdn
parent2f69335710884ae6112fc8196ebe29b5cda7b79b (diff)
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 <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/i4l/isdn_common.c8
-rw-r--r--drivers/isdn/i4l/isdn_tty.c12
2 files changed, 10 insertions, 10 deletions
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)
913 while ((count_pull < skb->len) && (len > 0)) { 913 while ((count_pull < skb->len) && (len > 0)) {
914 /* push every character but the last to the tty buffer directly */ 914 /* push every character but the last to the tty buffer directly */
915 if (count_put) 915 if (count_put)
916 tty_insert_flip_char(tty, last, TTY_NORMAL); 916 tty_insert_flip_char(port, last, TTY_NORMAL);
917 len--; 917 len--;
918 if (dev->drv[di]->DLEflag & DLEmask) { 918 if (dev->drv[di]->DLEflag & DLEmask) {
919 last = DLE; 919 last = DLE;
@@ -953,16 +953,16 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
953 * Now we can dequeue it. 953 * Now we can dequeue it.
954 */ 954 */
955 if (cisco_hack) 955 if (cisco_hack)
956 tty_insert_flip_char(tty, last, 0xFF); 956 tty_insert_flip_char(port, last, 0xFF);
957 else 957 else
958 tty_insert_flip_char(tty, last, TTY_NORMAL); 958 tty_insert_flip_char(port, last, TTY_NORMAL);
959#ifdef CONFIG_ISDN_AUDIO 959#ifdef CONFIG_ISDN_AUDIO
960 ISDN_AUDIO_SKB_LOCK(skb) = 0; 960 ISDN_AUDIO_SKB_LOCK(skb) = 0;
961#endif 961#endif
962 skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]); 962 skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]);
963 dev_kfree_skb(skb); 963 dev_kfree_skb(skb);
964 } else { 964 } else {
965 tty_insert_flip_char(tty, last, TTY_NORMAL); 965 tty_insert_flip_char(port, last, TTY_NORMAL);
966 /* Not yet emptied this buff, so it 966 /* Not yet emptied this buff, so it
967 * must stay in the queue, for further calls 967 * must stay in the queue, for further calls
968 * but we pull off the data we got until now. 968 * 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)
92 unsigned char *dp = skb->data; 92 unsigned char *dp = skb->data;
93 while (--l) { 93 while (--l) {
94 if (*dp == DLE) 94 if (*dp == DLE)
95 tty_insert_flip_char(tty, DLE, 0); 95 tty_insert_flip_char(port, DLE, 0);
96 tty_insert_flip_char(tty, *dp++, 0); 96 tty_insert_flip_char(port, *dp++, 0);
97 } 97 }
98 if (*dp == DLE) 98 if (*dp == DLE)
99 tty_insert_flip_char(tty, DLE, 0); 99 tty_insert_flip_char(port, DLE, 0);
100 last = *dp; 100 last = *dp;
101 } else { 101 } else {
102#endif 102#endif
@@ -107,9 +107,9 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb)
107 } 107 }
108#endif 108#endif
109 if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP) 109 if (info->emu.mdmreg[REG_CPPP] & BIT_CPPP)
110 tty_insert_flip_char(tty, last, 0xFF); 110 tty_insert_flip_char(port, last, 0xFF);
111 else 111 else
112 tty_insert_flip_char(tty, last, TTY_NORMAL); 112 tty_insert_flip_char(port, last, TTY_NORMAL);
113 tty_flip_buffer_push(tty); 113 tty_flip_buffer_push(tty);
114 kfree_skb(skb); 114 kfree_skb(skb);
115 115
@@ -2287,7 +2287,7 @@ isdn_tty_at_cout(char *msg, modem_info *info)
2287 if (skb) { 2287 if (skb) {
2288 *sp++ = c; 2288 *sp++ = c;
2289 } else { 2289 } else {
2290 if (tty_insert_flip_char(tty, c, TTY_NORMAL) == 0) 2290 if (tty_insert_flip_char(port, c, TTY_NORMAL) == 0)
2291 break; 2291 break;
2292 } 2292 }
2293 } 2293 }