diff mbox series

[09/16] tty: drivers/tty/, stop using tty_flip_buffer_push

Message ID 20210914091415.17918-2-jslaby@suse.cz
State New
Headers show
Series [01/16] tty: unexport tty_ldisc_release | expand

Commit Message

Jiri Slaby Sept. 14, 2021, 9:14 a.m. UTC
Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in the rest of
drivers/tty/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: David Sterba <dsterba@suse.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>
---
 drivers/tty/amiserial.c           | 2 +-
 drivers/tty/ehv_bytechan.c        | 2 +-
 drivers/tty/hvc/hvc_console.c     | 2 +-
 drivers/tty/hvc/hvcs.c            | 2 +-
 drivers/tty/hvc/hvsi.c            | 6 +++---
 drivers/tty/ipwireless/hardware.c | 2 +-
 drivers/tty/ipwireless/tty.c      | 2 +-
 drivers/tty/mips_ejtag_fdc.c      | 2 +-
 drivers/tty/mxser.c               | 2 +-
 drivers/tty/n_gsm.c               | 4 ++--
 drivers/tty/nozomi.c              | 2 +-
 drivers/tty/pty.c                 | 2 +-
 drivers/tty/synclink_gt.c         | 2 +-
 drivers/tty/vcc.c                 | 2 +-
 14 files changed, 17 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 1e60dbef676c..47daa64e2a65 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -256,7 +256,7 @@  static void receive_chars(struct serial_state *info)
 	tty_insert_flip_char(&info->tport, ch, flag);
 	if (oe == 1)
 		tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN);
-	tty_flip_buffer_push(&info->tport);
+	tty_schedule_flip(&info->tport);
 out:
 	return;
 }
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 19d32cb6af84..971f7c557e29 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -393,7 +393,7 @@  static irqreturn_t ehv_bc_tty_rx_isr(int irq, void *data)
 	}
 
 	/* Tell the tty layer that we're done. */
-	tty_flip_buffer_push(&bc->port);
+	tty_schedule_flip(&bc->port);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 7b30d5a05e2f..dc8db977bec7 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -752,7 +752,7 @@  static int __hvc_poll(struct hvc_struct *hp, bool may_sleep)
 		   a minimum for performance. */
 		timeout = MIN_TIMEOUT;
 
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 	}
 	tty_kref_put(tty);
 
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 245da1dfd818..51e8478d55c0 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -582,7 +582,7 @@  static int hvcs_io(struct hvcs_struct *hvcsd)
 	spin_unlock_irqrestore(&hvcsd->lock, flags);
 	/* This is synch -- FIXME :js: it is not! */
 	if(got)
-		tty_flip_buffer_push(&hvcsd->port);
+		tty_schedule_flip(&hvcsd->port);
 
 	if (!got) {
 		/* Do this _after_ the flip_buffer_push */
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index aa81f4835fef..8e4ad5cb2387 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -454,7 +454,7 @@  static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct *tty,
 	compact_inbuf(hp, packet);
 
 	if (flip)
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 
 	return 1;
 }
@@ -500,7 +500,7 @@  static irqreturn_t hvsi_interrupt(int irq, void *arg)
 		/* we weren't hung up and we weren't throttled, so we can
 		 * deliver the rest now */
 		hvsi_send_overflow(hp);
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 	}
 	spin_unlock_irqrestore(&hp->lock, flags);
 
@@ -982,7 +982,7 @@  static void hvsi_unthrottle(struct tty_struct *tty)
 	spin_lock_irqsave(&hp->lock, flags);
 	if (hp->n_throttle) {
 		hvsi_send_overflow(hp);
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 	}
 	spin_unlock_irqrestore(&hp->lock, flags);
 
diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c
index f5d3e68f5750..605a99f18ee1 100644
--- a/drivers/tty/ipwireless/hardware.c
+++ b/drivers/tty/ipwireless/hardware.c
@@ -719,7 +719,7 @@  static void ipw_receive_data_work(struct work_struct *work_rx)
 		/*
 		 * Note: ipwireless_network_packet_received must be called in a
 		 * process context (i.e. via schedule_work) because the tty
-		 * output code can sleep in the tty_flip_buffer_push call.
+		 * output code can sleep in the tty_schedule_flip call.
 		 */
 		if (packet->protocol == TL_PROTOCOLID_COM_DATA) {
 			if (hw->network != NULL) {
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
index 9edd5ae17580..694e62383479 100644
--- a/drivers/tty/ipwireless/tty.c
+++ b/drivers/tty/ipwireless/tty.c
@@ -171,7 +171,7 @@  void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
 				length - work);
 
 	if (work)
-		tty_flip_buffer_push(&tty->port);
+		tty_schedule_flip(&tty->port);
 }
 
 static void ipw_write_packet_sent_callback(void *callback_data,
diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index 02c10a968de1..b8675782cf28 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -613,7 +613,7 @@  static void mips_ejtag_fdc_handle(struct mips_ejtag_fdc_tty *priv)
 							TTY_NORMAL);
 		}
 		if (flipped)
-			tty_flip_buffer_push(&dport->port);
+			tty_schedule_flip(&dport->port);
 
 		raw_spin_unlock(&dport->rx_lock);
 	}
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 1216f3985e18..e084e4803f9f 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1637,7 +1637,7 @@  static u8 mxser_receive_chars(struct tty_struct *tty,
 	if (!mxser_receive_chars_new(tty, port, status))
 		status = mxser_receive_chars_old(tty, port, status);
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 
 	return status;
 }
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 59bbd4f6a610..b734362cdbea 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1171,7 +1171,7 @@  static void gsm_control_rls(struct gsm_mux *gsm, const u8 *data, int clen)
 	if (bits & 8)
 		tty_insert_flip_char(port, 0, TTY_FRAME);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	gsm_control_reply(gsm, CMD_RLS, data, clen);
 }
@@ -1589,7 +1589,7 @@  static void gsm_dlci_data(struct gsm_dlci *dlci, const u8 *data, int clen)
 	case 1:		/* Line state will go via DLCI 0 controls only */
 	default:
 		tty_insert_flip_string(port, data, len);
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 	}
 }
 
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index 0454c78deee6..a70512470799 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1222,7 +1222,7 @@  static irqreturn_t interrupt_handler(int irq, void *dev_id)
 
 	for (a = 0; a < NOZOMI_MAX_PORTS; a++)
 		if (test_and_clear_bit(a, &dc->flip))
-			tty_flip_buffer_push(&dc->port[a].port);
+			tty_schedule_flip(&dc->port[a].port);
 
 	return IRQ_HANDLED;
 none:
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 74bfabe5b453..95cb84319b7d 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -123,7 +123,7 @@  static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
 		spin_unlock_irqrestore(&to->port->lock, flags);
 		/* And shovel */
 		if (c)
-			tty_flip_buffer_push(to->port);
+			tty_schedule_flip(to->port);
 	}
 	return c;
 }
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index a9acd93e85b7..beea9c6141a5 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -1820,7 +1820,7 @@  static void rx_async(struct slgt_info *info)
 	}
 
 	if (chars)
-		tty_flip_buffer_push(&info->port);
+		tty_schedule_flip(&info->port);
 }
 
 /*
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c
index e11383ae1e7e..0fa8539a0f6b 100644
--- a/drivers/tty/vcc.c
+++ b/drivers/tty/vcc.c
@@ -297,7 +297,7 @@  static int vcc_rx(struct tty_struct *tty, char *buf, int size)
 
 	len = tty_insert_flip_string(tty->port, buf, size);
 	if (len)
-		tty_flip_buffer_push(tty->port);
+		tty_schedule_flip(tty->port);
 
 	return len;
 }