diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-01-03 09:53:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:22:35 -0500 |
commit | 05c7cd39907184328f48d3e7899f9cdd653ad336 (patch) | |
tree | 9d1ed5c757426aa20b7eccd853faa6b519a4aa7b /drivers/isdn | |
parent | 92a19f9cec9a80ad93c06e115822deb729e2c6ad (diff) |
TTY: switch tty_insert_flip_string
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_string this time.
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/gigaset/interface.c | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 5 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.h | 2 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 6 |
4 files changed, 7 insertions, 8 deletions
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 67abf3ff45e8..dd2a57eca2e7 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -569,7 +569,7 @@ void gigaset_if_receive(struct cardstate *cs, | |||
569 | return; | 569 | return; |
570 | } | 570 | } |
571 | 571 | ||
572 | tty_insert_flip_string(tty, buffer, len); | 572 | tty_insert_flip_string(&cs->port, buffer, len); |
573 | tty_flip_buffer_push(tty); | 573 | tty_flip_buffer_push(tty); |
574 | tty_kref_put(tty); | 574 | tty_kref_put(tty); |
575 | } | 575 | } |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 4a387ec021ad..b87d9e577be2 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -876,9 +876,8 @@ isdn_readbchan(int di, int channel, u_char *buf, u_char *fp, int len, wait_queue | |||
876 | * of the mapping (di,ch)<->minor, happen during the sleep? --he | 876 | * of the mapping (di,ch)<->minor, happen during the sleep? --he |
877 | */ | 877 | */ |
878 | int | 878 | int |
879 | isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | 879 | isdn_readbchan_tty(int di, int channel, struct tty_port *port, int cisco_hack) |
880 | { | 880 | { |
881 | struct tty_port *port = tty->port; | ||
882 | int count; | 881 | int count; |
883 | int count_pull; | 882 | int count_pull; |
884 | int count_put; | 883 | int count_put; |
@@ -941,7 +940,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
941 | } | 940 | } |
942 | count_put = count_pull; | 941 | count_put = count_pull; |
943 | if (count_put > 1) | 942 | if (count_put > 1) |
944 | tty_insert_flip_string(tty, skb->data, count_put - 1); | 943 | tty_insert_flip_string(port, skb->data, count_put - 1); |
945 | last = skb->data[count_put - 1]; | 944 | last = skb->data[count_put - 1]; |
946 | len -= count_put; | 945 | len -= count_put; |
947 | #ifdef CONFIG_ISDN_AUDIO | 946 | #ifdef CONFIG_ISDN_AUDIO |
diff --git a/drivers/isdn/i4l/isdn_common.h b/drivers/isdn/i4l/isdn_common.h index 9a471f62e1d4..2260ef07ab9c 100644 --- a/drivers/isdn/i4l/isdn_common.h +++ b/drivers/isdn/i4l/isdn_common.h | |||
@@ -37,7 +37,7 @@ extern void isdn_timer_ctrl(int tf, int onoff); | |||
37 | extern void isdn_unexclusive_channel(int di, int ch); | 37 | extern void isdn_unexclusive_channel(int di, int ch); |
38 | extern int isdn_getnum(char **); | 38 | extern int isdn_getnum(char **); |
39 | extern int isdn_readbchan(int, int, u_char *, u_char *, int, wait_queue_head_t *); | 39 | extern int isdn_readbchan(int, int, u_char *, u_char *, int, wait_queue_head_t *); |
40 | extern int isdn_readbchan_tty(int, int, struct tty_struct *, int); | 40 | extern int isdn_readbchan_tty(int, int, struct tty_port *, int); |
41 | extern int isdn_get_free_channel(int, int, int, int, int, char *); | 41 | extern int isdn_get_free_channel(int, int, int, int, int, char *); |
42 | extern int isdn_writebuf_skb_stub(int, int, int, struct sk_buff *); | 42 | extern int isdn_writebuf_skb_stub(int, int, int, struct sk_buff *); |
43 | extern int register_isdn(isdn_if *i); | 43 | extern int register_isdn(isdn_if *i); |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 32d65d4bc848..9bb9986659e4 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -101,7 +101,7 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb) | |||
101 | } else { | 101 | } else { |
102 | #endif | 102 | #endif |
103 | if (len > 1) | 103 | if (len > 1) |
104 | tty_insert_flip_string(tty, skb->data, len - 1); | 104 | tty_insert_flip_string(port, skb->data, len - 1); |
105 | last = skb->data[len - 1]; | 105 | last = skb->data[len - 1]; |
106 | #ifdef CONFIG_ISDN_AUDIO | 106 | #ifdef CONFIG_ISDN_AUDIO |
107 | } | 107 | } |
@@ -150,9 +150,9 @@ isdn_tty_readmodem(void) | |||
150 | if (info->mcr & UART_MCR_RTS) { | 150 | if (info->mcr & UART_MCR_RTS) { |
151 | /* CISCO AsyncPPP Hack */ | 151 | /* CISCO AsyncPPP Hack */ |
152 | if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP)) | 152 | if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP)) |
153 | r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, tty, 0); | 153 | r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, &info->port, 0); |
154 | else | 154 | else |
155 | r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, tty, 1); | 155 | r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, &info->port, 1); |
156 | if (r) | 156 | if (r) |
157 | tty_flip_buffer_push(tty); | 157 | tty_flip_buffer_push(tty); |
158 | } else | 158 | } else |