tty: vt: remove consw::con_getxy()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 22 Jan 2024 11:03:57 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jan 2024 02:08:55 +0000 (18:08 -0800)
After the previous patch, nobody sets that hook. So drop it completely.

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-44-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c
include/linux/console.h

index f6fa76c0eb5b937925b86260c3de9c2941c5f5e1..cbe1a1106d531b23db10a9295a652ea81f06cdc9 100644 (file)
@@ -593,18 +593,12 @@ static void con_scroll(struct vc_data *vc, unsigned int top,
 static void do_update_region(struct vc_data *vc, unsigned long start, int count)
 {
        unsigned int xx, yy, offset;
-       u16 *p;
+       u16 *p = (u16 *)start;
+
+       offset = (start - vc->vc_origin) / 2;
+       xx = offset % vc->vc_cols;
+       yy = offset / vc->vc_cols;
 
-       p = (u16 *) start;
-       if (!vc->vc_sw->con_getxy) {
-               offset = (start - vc->vc_origin) / 2;
-               xx = offset % vc->vc_cols;
-               yy = offset / vc->vc_cols;
-       } else {
-               int nxx, nyy;
-               start = vc->vc_sw->con_getxy(vc, start, &nxx, &nyy);
-               xx = nxx; yy = nyy;
-       }
        for(;;) {
                u16 attrib = scr_readw(p) & 0xff00;
                int startx = xx;
@@ -627,10 +621,6 @@ static void do_update_region(struct vc_data *vc, unsigned long start, int count)
                        break;
                xx = 0;
                yy++;
-               if (vc->vc_sw->con_getxy) {
-                       p = (u16 *)start;
-                       start = vc->vc_sw->con_getxy(vc, start, NULL, NULL);
-               }
        }
 }
 
index b2d8621cea575db48fe492a1f26eac5d259afd68..fa2cd81102b88e851cba1b5c393397651beb9609 100644 (file)
@@ -96,8 +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);
-       unsigned long (*con_getxy)(struct vc_data *vc, unsigned long position,
-                       int *px, int *py);
        /*
         * Flush the video console driver's scrollback buffer
         */