mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 06:01:53 +02:00
fbdev/core: simplify cursor_state setting in fbcon_ops::cursor()
There is a switch decicing if cursor should be drawn or not. The whole switch can be simplified to one line. Do this cleanup as a preparatory work for the next patch. There, all the CM_* constants are removed. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Helge Deller <deller@gmx.de> Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Tested-by: Helge Deller <deller@gmx.de> # parisc STI console Link: https://lore.kernel.org/r/20240122110401.7289-29-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7c5337c9ea
commit
9aefbaeb30
|
|
@ -348,16 +348,7 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode,
|
|||
mask[i++] = msk;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case CM_ERASE:
|
||||
ops->cursor_state.enable = 0;
|
||||
break;
|
||||
case CM_DRAW:
|
||||
case CM_MOVE:
|
||||
default:
|
||||
ops->cursor_state.enable = (use_sw) ? 0 : 1;
|
||||
break;
|
||||
}
|
||||
ops->cursor_state.enable = (mode != CM_ERASE) && !use_sw;
|
||||
|
||||
cursor.image.data = src;
|
||||
cursor.image.fg_color = ops->cursor_state.image.fg_color;
|
||||
|
|
|
|||
|
|
@ -349,16 +349,7 @@ static void ccw_cursor(struct vc_data *vc, struct fb_info *info, int mode,
|
|||
kfree(tmp);
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case CM_ERASE:
|
||||
ops->cursor_state.enable = 0;
|
||||
break;
|
||||
case CM_DRAW:
|
||||
case CM_MOVE:
|
||||
default:
|
||||
ops->cursor_state.enable = (use_sw) ? 0 : 1;
|
||||
break;
|
||||
}
|
||||
ops->cursor_state.enable = (mode != CM_ERASE) && !use_sw;
|
||||
|
||||
cursor.image.data = src;
|
||||
cursor.image.fg_color = ops->cursor_state.image.fg_color;
|
||||
|
|
|
|||
|
|
@ -332,16 +332,7 @@ static void cw_cursor(struct vc_data *vc, struct fb_info *info, int mode,
|
|||
kfree(tmp);
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case CM_ERASE:
|
||||
ops->cursor_state.enable = 0;
|
||||
break;
|
||||
case CM_DRAW:
|
||||
case CM_MOVE:
|
||||
default:
|
||||
ops->cursor_state.enable = (use_sw) ? 0 : 1;
|
||||
break;
|
||||
}
|
||||
ops->cursor_state.enable = (mode != CM_ERASE) && !use_sw;
|
||||
|
||||
cursor.image.data = src;
|
||||
cursor.image.fg_color = ops->cursor_state.image.fg_color;
|
||||
|
|
|
|||
|
|
@ -372,16 +372,7 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, int mode,
|
|||
mask[i++] = ~msk;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case CM_ERASE:
|
||||
ops->cursor_state.enable = 0;
|
||||
break;
|
||||
case CM_DRAW:
|
||||
case CM_MOVE:
|
||||
default:
|
||||
ops->cursor_state.enable = (use_sw) ? 0 : 1;
|
||||
break;
|
||||
}
|
||||
ops->cursor_state.enable = (mode != CM_ERASE) && !use_sw;
|
||||
|
||||
cursor.image.data = src;
|
||||
cursor.image.fg_color = ops->cursor_state.image.fg_color;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user