Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tty: vt: remove consw::con_screen_pos()

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>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
7cf01c92 d62808ba

+3 -10
+3 -9
drivers/tty/vt/vt.c
··· 289 289 static inline unsigned short *screenpos(const struct vc_data *vc, int offset, 290 290 bool viewed) 291 291 { 292 - unsigned short *p; 293 - 294 - if (!viewed) 295 - p = (unsigned short *)(vc->vc_origin + offset); 296 - else if (!vc->vc_sw->con_screen_pos) 297 - p = (unsigned short *)(vc->vc_visible_origin + offset); 298 - else 299 - p = vc->vc_sw->con_screen_pos(vc, offset); 300 - return p; 292 + unsigned long origin = viewed ? vc->vc_visible_origin : vc->vc_origin; 293 + 294 + return (unsigned short *)(origin + offset); 301 295 } 302 296 303 297 static void con_putc(struct vc_data *vc, u16 ca, unsigned int y, unsigned int x)
-1
include/linux/console.h
··· 96 96 enum vc_intensity intensity, 97 97 bool blink, bool underline, bool reverse, bool italic); 98 98 void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); 99 - u16 *(*con_screen_pos)(const struct vc_data *vc, int offset); 100 99 unsigned long (*con_getxy)(struct vc_data *vc, unsigned long position, 101 100 int *px, int *py); 102 101 /*