diff mbox series

[06/16] media: mt9v111: constify copied structure

Message ID 1577864614-5543-7-git-send-email-Julia.Lawall@inria.fr (mailing list archive)
State New, archived
Headers show
Series constify copied structure | expand

Commit Message

Julia Lawall Jan. 1, 2020, 7:43 a.m. UTC
The mt9v111_def_fmt structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/i2c/mt9v111.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacopo Mondi Jan. 2, 2020, 8:11 a.m. UTC | #1
Hi Julia,
   thanks for the patch

On Wed, Jan 01, 2020 at 08:43:24AM +0100, Julia Lawall wrote:
> The mt9v111_def_fmt structure is only copied into another structure,
> so make it const.
>
> The opportunity for this change was found using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Acked-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks
   j

>
> ---
>  drivers/media/i2c/mt9v111.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
> index bb41bea950ac..61ae6a0d5679 100644
> --- a/drivers/media/i2c/mt9v111.c
> +++ b/drivers/media/i2c/mt9v111.c
> @@ -103,7 +103,7 @@
>  #define MT9V111_MAX_CLKIN				27000000
>
>  /* The default sensor configuration at startup time. */
> -static struct v4l2_mbus_framefmt mt9v111_def_fmt = {
> +static const struct v4l2_mbus_framefmt mt9v111_def_fmt = {
>  	.width		= 640,
>  	.height		= 480,
>  	.code		= MEDIA_BUS_FMT_UYVY8_2X8,
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index bb41bea950ac..61ae6a0d5679 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -103,7 +103,7 @@ 
 #define MT9V111_MAX_CLKIN				27000000
 
 /* The default sensor configuration at startup time. */
-static struct v4l2_mbus_framefmt mt9v111_def_fmt = {
+static const struct v4l2_mbus_framefmt mt9v111_def_fmt = {
 	.width		= 640,
 	.height		= 480,
 	.code		= MEDIA_BUS_FMT_UYVY8_2X8,