Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05c7cd39 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

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: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92a19f9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@ void gigaset_if_receive(struct cardstate *cs,
		return;
	}

	tty_insert_flip_string(tty, buffer, len);
	tty_insert_flip_string(&cs->port, buffer, len);
	tty_flip_buffer_push(tty);
	tty_kref_put(tty);
}
+2 −3
Original line number Diff line number Diff line
@@ -876,9 +876,8 @@ isdn_readbchan(int di, int channel, u_char *buf, u_char *fp, int len, wait_queue
 * of the mapping (di,ch)<->minor, happen during the sleep? --he
 */
int
isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
isdn_readbchan_tty(int di, int channel, struct tty_port *port, int cisco_hack)
{
	struct tty_port *port = tty->port;
	int count;
	int count_pull;
	int count_put;
@@ -941,7 +940,7 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack)
			}
			count_put = count_pull;
			if (count_put > 1)
				tty_insert_flip_string(tty, skb->data, count_put - 1);
				tty_insert_flip_string(port, skb->data, count_put - 1);
			last = skb->data[count_put - 1];
			len -= count_put;
#ifdef CONFIG_ISDN_AUDIO
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ extern void isdn_timer_ctrl(int tf, int onoff);
extern void isdn_unexclusive_channel(int di, int ch);
extern int isdn_getnum(char **);
extern int isdn_readbchan(int, int, u_char *, u_char *, int, wait_queue_head_t *);
extern int isdn_readbchan_tty(int, int, struct tty_struct *, int);
extern int isdn_readbchan_tty(int, int, struct tty_port *, int);
extern int isdn_get_free_channel(int, int, int, int, int, char *);
extern int isdn_writebuf_skb_stub(int, int, int, struct sk_buff *);
extern int register_isdn(isdn_if *i);
+3 −3
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ isdn_tty_try_read(modem_info *info, struct sk_buff *skb)
	} else {
#endif
		if (len > 1)
			tty_insert_flip_string(tty, skb->data, len - 1);
			tty_insert_flip_string(port, skb->data, len - 1);
		last = skb->data[len - 1];
#ifdef CONFIG_ISDN_AUDIO
	}
@@ -150,9 +150,9 @@ isdn_tty_readmodem(void)
			if (info->mcr & UART_MCR_RTS) {
				/* CISCO AsyncPPP Hack */
				if (!(info->emu.mdmreg[REG_CPPP] & BIT_CPPP))
					r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, tty, 0);
					r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, &info->port, 0);
				else
					r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, tty, 1);
					r = isdn_readbchan_tty(info->isdn_driver, info->isdn_channel, &info->port, 1);
				if (r)
					tty_flip_buffer_push(tty);
			} else
+3 −4
Original line number Diff line number Diff line
@@ -2044,9 +2044,8 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
				tty_kref_put(tty);
				return -1;
			}
			curr_write_len =  tty_insert_flip_string
				(tty, urb->transfer_buffer +
				 serial->curr_rx_urb_offset,
			curr_write_len = tty_insert_flip_string(&serial->port,
				urb->transfer_buffer + serial->curr_rx_urb_offset,
				write_length_remaining);
			serial->curr_rx_urb_offset += curr_write_len;
			write_length_remaining -= curr_write_len;
Loading