
From: Simon Glass <sjg@chromium.org> For now the cursor is always vertical, so part of this name is redundant. Rename it to cursor_show(), which is what it does. We will eventually have a cursor_hide() to match it. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/video/console_core.c | 5 +++-- drivers/video/console_normal.c | 3 +-- drivers/video/console_truetype.c | 2 +- drivers/video/vidconsole_internal.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/video/console_core.c b/drivers/video/console_core.c index aec51dc809d..36e7f81dc0a 100644 --- a/drivers/video/console_core.c +++ b/drivers/video/console_core.c @@ -160,8 +160,8 @@ int fill_char_horizontally(uchar *pfont, void **line, struct video_priv *vid_pri return ret; } -int draw_cursor_vertically(void **line, struct video_priv *vid_priv, - uint height, bool direction) +int cursor_show(void **line, struct video_priv *vid_priv, uint height, + bool direction) { int step, line_step, pbytes, ret; uint value; @@ -188,6 +188,7 @@ int draw_cursor_vertically(void **line, struct video_priv *vid_priv, fill_pixel_and_goto_next(&dst, value, pbytes, step); *line += line_step; } + return ret; } diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c index 68d47eb8da6..3865870dcd5 100644 --- a/drivers/video/console_normal.c +++ b/drivers/video/console_normal.c @@ -99,8 +99,7 @@ static int __maybe_unused console_set_cursor_visible(struct udevice *dev, start = vid_priv->fb + y * vid_priv->line_length + x * pbytes; line = start; - draw_cursor_vertically(&line, vid_priv, vc_priv->y_charsize, - NORMAL_DIRECTION); + cursor_show(&line, vid_priv, vc_priv->y_charsize, NORMAL_DIRECTION); return 0; } diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index fb7f70a4b2a..babab5eb2c3 100644 --- a/drivers/video/console_truetype.c +++ b/drivers/video/console_truetype.c @@ -1032,7 +1032,7 @@ static int truetype_set_cursor_visible(struct udevice *dev, bool visible, x * VNBYTES(vid_priv->bpix); /* Use the shared cursor drawing function */ - draw_cursor_vertically(&line, vid_priv, height, NORMAL_DIRECTION); + cursor_show(&line, vid_priv, height, NORMAL_DIRECTION); video_damage(dev->parent, x, y, VIDCONSOLE_CURSOR_WIDTH, height); diff --git a/drivers/video/vidconsole_internal.h b/drivers/video/vidconsole_internal.h index af2cca8791c..02b73296292 100644 --- a/drivers/video/vidconsole_internal.h +++ b/drivers/video/vidconsole_internal.h @@ -96,7 +96,7 @@ int fill_char_horizontally(uchar *pfont, void **line, struct video_priv *vid_pri struct video_fontdata *fontdata, bool direction); /** - * draw_cursor_vertically() - Draw a simple vertical cursor + * cursor_show() - Draw a simple vertical cursor * * @line: pointer to framebuffer buffer: upper left cursor corner * @vid_priv: driver private data @@ -116,8 +116,8 @@ int fill_char_horizontally(uchar *pfont, void **line, struct video_priv *vid_pri * * Return: 0, if success, or else error code. */ -int draw_cursor_vertically(void **line, struct video_priv *vid_priv, - uint height, bool direction); +int cursor_show(void **line, struct video_priv *vid_priv, uint height, + bool direction); /** * console probe function. -- 2.43.0