Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: vimc: constify video_subdev structures

These structures are all only stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be const
as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Julia Lawall and committed by
Mauro Carvalho Chehab
ebf7a648 46014f61

+3 -3
+1 -1
drivers/media/platform/vimc/vimc-debayer.c
··· 373 373 return 0; 374 374 } 375 375 376 - static struct v4l2_subdev_video_ops vimc_deb_video_ops = { 376 + static const struct v4l2_subdev_video_ops vimc_deb_video_ops = { 377 377 .s_stream = vimc_deb_s_stream, 378 378 }; 379 379
+1 -1
drivers/media/platform/vimc/vimc-scaler.c
··· 267 267 return 0; 268 268 } 269 269 270 - static struct v4l2_subdev_video_ops vimc_sca_video_ops = { 270 + static const struct v4l2_subdev_video_ops vimc_sca_video_ops = { 271 271 .s_stream = vimc_sca_s_stream, 272 272 }; 273 273
+1 -1
drivers/media/platform/vimc/vimc-sensor.c
··· 282 282 return 0; 283 283 } 284 284 285 - static struct v4l2_subdev_video_ops vimc_sen_video_ops = { 285 + static const struct v4l2_subdev_video_ops vimc_sen_video_ops = { 286 286 .s_stream = vimc_sen_s_stream, 287 287 }; 288 288