From 380aec8a64ec7475bebcc7e6daa31244f85a042a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 30 Jul 2022 14:34:42 +0200 Subject: [PATCH] ANDROID: add tty_schedule_flip() back to the kernel Commit 2ea77b0b6d22 ("tty: drop tty_schedule_flip()") removed tty_schedule_flip() as all in-kernel users were properly converted over to use tty_flip_buffer_push(), but this function still needs to be here for older out-of-tree Android-only drivers to preserve the ABI. So provide a wrapper function for it to keep them alive for now. Bug: 161946584 Fixes: 2ea77b0b6d22 ("tty: drop tty_schedule_flip()") Signed-off-by: Greg Kroah-Hartman Change-Id: I8893f07cf68bc3502ac6f0f7f0a26b0eec3726a2 --- drivers/tty/tty_buffer.c | 6 ++++++ include/linux/tty_flip.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 49f39c041c35..d792ab8f20af 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -643,3 +643,9 @@ void tty_buffer_flush_work(struct tty_port *port) { flush_work(&port->buf.work); } + +void tty_schedule_flip(struct tty_port *port) +{ + tty_flip_buffer_push(port); +} +EXPORT_SYMBOL(tty_schedule_flip); diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index c326bfdb5ec2..94d351196bfc 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h @@ -42,4 +42,5 @@ extern void tty_buffer_unlock_exclusive(struct tty_port *port); int tty_insert_flip_string_and_push_buffer(struct tty_port *port, const unsigned char *chars, size_t cnt); +void tty_schedule_flip(struct tty_port *port); #endif /* _LINUX_TTY_FLIP_H */