tty: vt: remove unused consw::con_flush_scrollback()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 22 Jan 2024 11:03:58 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 02:08:55 +0000 (18:08 -0800)
consw::con_flush_scrollback() is unused since commit 973c096f6a85
(vgacon: remove software scrollback support). Drop it.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-45-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c
include/linux/console.h

index cbe1a1106d531b23db10a9295a652ea81f06cdc9..bfe51af9a0f322ccf5045ba2d8ec6cc29a1f8ea6 100644 (file)
@@ -888,21 +888,18 @@ static void flush_scrollback(struct vc_data *vc)
        WARN_CONSOLE_UNLOCKED();
 
        set_origin(vc);
-       if (vc->vc_sw->con_flush_scrollback) {
-               vc->vc_sw->con_flush_scrollback(vc);
-       } else if (con_is_visible(vc)) {
-               /*
-                * When no con_flush_scrollback method is provided then the
-                * legacy way for flushing the scrollback buffer is to use
-                * a side effect of the con_switch method. We do it only on
-                * the foreground console as background consoles have no
-                * scrollback buffers in that case and we obviously don't
-                * want to switch to them.
-                */
-               hide_cursor(vc);
-               vc->vc_sw->con_switch(vc);
-               set_cursor(vc);
-       }
+       if (!con_is_visible(vc))
+               return;
+
+       /*
+        * The legacy way for flushing the scrollback buffer is to use a side
+        * effect of the con_switch method. We do it only on the foreground
+        * console as background consoles have no scrollback buffers in that
+        * case and we obviously don't want to switch to them.
+        */
+       hide_cursor(vc);
+       vc->vc_sw->con_switch(vc);
+       set_cursor(vc);
 }
 
 /*
index fa2cd81102b88e851cba1b5c393397651beb9609..1eac3e6e32a2cc9f2540173d05a96392b79e9340 100644 (file)
@@ -96,10 +96,6 @@ struct consw {
                        enum vc_intensity intensity,
                        bool blink, bool underline, bool reverse, bool italic);
        void    (*con_invert_region)(struct vc_data *vc, u16 *p, int count);
-       /*
-        * Flush the video console driver's scrollback buffer
-        */
-       void    (*con_flush_scrollback)(struct vc_data *vc);
        /*
         * Prepare the console for the debugger.  This includes, but is not
         * limited to, unblanking the console, loading an appropriate