media: fimc-lite: constify pointers to v4l2_pix_format_mplane
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 24 Dec 2023 11:49:07 +0000 (12:49 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 22 Jan 2024 11:16:42 +0000 (12:16 +0100)
In few places functions do not modify pointed "struct
v4l2_pix_format_mplane", thus the pointer can point to const data for
additional safety and self-documenting intention of the function.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/samsung/exynos4-is/fimc-lite.c

index 7898c9bebb04679062226ccc234280cdd25ef0a6..d1d860fa3454de1f3413211e313782681104a5ac 100644 (file)
@@ -738,7 +738,7 @@ static int fimc_lite_try_fmt_mplane(struct file *file, void *fh,
 static int fimc_lite_s_fmt_mplane(struct file *file, void *priv,
                                  struct v4l2_format *f)
 {
-       struct v4l2_pix_format_mplane *pixm = &f->fmt.pix_mp;
+       const struct v4l2_pix_format_mplane *pixm = &f->fmt.pix_mp;
        struct fimc_lite *fimc = video_drvdata(file);
        struct flite_frame *frame = &fimc->out_frame;
        const struct fimc_fmt *fmt = NULL;