diff mbox series

[05/16] media: isif: constify copied structure

Message ID 1577864614-5543-6-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 isif_config_defaults 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/platform/davinci/isif.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Prabhakar Jan. 9, 2020, 7:13 a.m. UTC | #1
On Wed, Jan 1, 2020 at 8:20 AM Julia Lawall <Julia.Lawall@inria.fr> wrote:
>
> The isif_config_defaults 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: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

> ---
>  drivers/media/platform/davinci/isif.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
> index b49378b18e5d..c98edb67cfb2 100644
> --- a/drivers/media/platform/davinci/isif.c
> +++ b/drivers/media/platform/davinci/isif.c
> @@ -29,7 +29,7 @@
>  #include "ccdc_hw_device.h"
>
>  /* Defaults for module configuration parameters */
> -static struct isif_config_params_raw isif_config_defaults = {
> +static const struct isif_config_params_raw isif_config_defaults = {
>         .linearize = {
>                 .en = 0,
>                 .corr_shft = ISIF_NO_SHIFT,
>
diff mbox series

Patch

diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
index b49378b18e5d..c98edb67cfb2 100644
--- a/drivers/media/platform/davinci/isif.c
+++ b/drivers/media/platform/davinci/isif.c
@@ -29,7 +29,7 @@ 
 #include "ccdc_hw_device.h"
 
 /* Defaults for module configuration parameters */
-static struct isif_config_params_raw isif_config_defaults = {
+static const struct isif_config_params_raw isif_config_defaults = {
 	.linearize = {
 		.en = 0,
 		.corr_shft = ISIF_NO_SHIFT,