aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/console/sticon.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2020-06-15 09:48:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-24 17:08:30 +0200
commit28bc24fc46f9c9f39ddefb424d6072041805b563 (patch)
tree4ba6b3539e1905ac487d8c7bbfec8d3043e6bdf4 /drivers/video/console/sticon.c
parentum: line, remove put_char (diff)
downloadlinux-dev-28bc24fc46f9c9f39ddefb424d6072041805b563.tar.xz
linux-dev-28bc24fc46f9c9f39ddefb424d6072041805b563.zip
vc: separate state
There are two copies of some members of struct vc_data. This is because we need to save them and restore later. Move these memebers to a separate structure called vc_state. So now instead of members like: vc_x, vc_y and vc_saved_x, vc_saved_y we have state and saved_state (of type: struct vc_state) containing state.x, state.y and saved_state.x, saved_state.y This change: * makes clear what is saved & restored * eases save & restore by using memcpy (see save_cur and restore_cur) Finally, we document the newly added struct vc_state using kernel-doc. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20200615074910.19267-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/console/sticon.c')
-rw-r--r--drivers/video/console/sticon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index 79c9bd8d3025..90083eb80515 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -132,10 +132,10 @@ static void sticon_cursor(struct vc_data *conp, int mode)
{
unsigned short car1;
- car1 = conp->vc_screenbuf[conp->vc_x + conp->vc_y * conp->vc_cols];
+ car1 = conp->vc_screenbuf[conp->state.x + conp->state.y * conp->vc_cols];
switch (mode) {
case CM_ERASE:
- sti_putc(sticon_sti, car1, conp->vc_y, conp->vc_x);
+ sti_putc(sticon_sti, car1, conp->state.y, conp->state.x);
break;
case CM_MOVE:
case CM_DRAW:
@@ -146,7 +146,7 @@ static void sticon_cursor(struct vc_data *conp, int mode)
case CUR_TWO_THIRDS:
case CUR_BLOCK:
sti_putc(sticon_sti, (car1 & 255) + (0 << 8) + (7 << 11),
- conp->vc_y, conp->vc_x);
+ conp->state.y, conp->state.x);
break;
}
break;