tty: vt: remove consw::con_screen_pos()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 22 Jan 2024 11:03:54 +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-41-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c
include/linux/console.h

index 0ac537f82f7ad27f45c38175064c8da78a464696..4e9d689143e0d0049a0b5220a1f3ae564d07ad18 100644 (file)
@@ -289,15 +289,9 @@ static inline bool con_should_update(const struct vc_data *vc)
 static inline unsigned short *screenpos(const struct vc_data *vc, int offset,
                bool viewed)
 {
-       unsigned short *p;
-       
-       if (!viewed)
-               p = (unsigned short *)(vc->vc_origin + offset);
-       else if (!vc->vc_sw->con_screen_pos)
-               p = (unsigned short *)(vc->vc_visible_origin + offset);
-       else
-               p = vc->vc_sw->con_screen_pos(vc, offset);
-       return p;
+       unsigned long origin = viewed ? vc->vc_visible_origin : vc->vc_origin;
+
+       return (unsigned short *)(origin + offset);
 }
 
 static void con_putc(struct vc_data *vc, u16 ca, unsigned int y, unsigned int x)
index 82e4b554a801f08141e020ed4b65789ad47120cf..b2d8621cea575db48fe492a1f26eac5d259afd68 100644 (file)
@@ -96,7 +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);
-       u16    *(*con_screen_pos)(const struct vc_data *vc, int offset);
        unsigned long (*con_getxy)(struct vc_data *vc, unsigned long position,
                        int *px, int *py);
        /*