summaryrefslogtreecommitdiff
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2024-01-22 12:03:54 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-27 18:08:55 -0800
commit7cf01c92addb73c3055ff0fc596441c80ce82113 (patch)
tree242806d0b2ad1607227f6ee7c66a160c51081821 /drivers/tty/vt
parentd62808ba9ebca537607678207d2deb25d949d923 (diff)
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>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/vt.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 0ac537f82f7a..4e9d689143e0 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -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)