Use the provided enum with this function, so it is clearer what should be passed to it.
Signed-off-by: Simon Glass <s...@chromium.org> --- drivers/video/video-uclass.c | 2 +- include/video.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 1db049bec004..5bf40e1138f4 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -260,7 +260,7 @@ static const struct vid_rgb colours[VID_COLOUR_COUNT] = { { 0xff, 0xff, 0xff }, /* white */ }; -u32 video_index_to_colour(struct video_priv *priv, unsigned int idx) +u32 video_index_to_colour(struct video_priv *priv, enum colour_idx idx) { switch (priv->bpix) { case VIDEO_BPP16: diff --git a/include/video.h b/include/video.h index dd0d55baa31a..124eb49fab7d 100644 --- a/include/video.h +++ b/include/video.h @@ -163,10 +163,10 @@ enum colour_idx { * VID_COLOR_COUNT. * * @priv private data of the video device (UCLASS_VIDEO) - * @idx color index + * @idx color index (e.g. VID_YELLOW) * Return: color value */ -u32 video_index_to_colour(struct video_priv *priv, unsigned int idx); +u32 video_index_to_colour(struct video_priv *priv, enum colour_idx idx); /** * video_reserve() - Reserve frame-buffer memory for video devices -- 2.41.0.rc0.172.g3f132b7071-goog