media: zoran: make zoran_template const
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 27 Sep 2017 14:16:47 +0000 (16:16 +0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 27 Oct 2017 12:12:04 +0000 (14:12 +0200)
Make this const as it is only used in a copy operation in the file
referencing it. Make the declaration const too.

Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/zoran/zoran_card.h
drivers/media/pci/zoran/zoran_driver.c

index 81cba177cd9027a5c883d0e1f3d93cf4e329d405..0cdb7d34926d28757b8732a0b89b360230794844 100644 (file)
@@ -37,7 +37,7 @@ extern int zr36067_debug;
 /* Anybody who uses more than four? */
 #define BUZ_MAX 4
 
-extern struct video_device zoran_template;
+extern const struct video_device zoran_template;
 
 extern int zoran_check_jpg_settings(struct zoran *zr,
                                    struct zoran_jpg_settings *settings,
index a11cb501c550049fe8b91bd464402006bbe2ba6b..d07840072337ff2b8f70076f49a0ab20f11c216e 100644 (file)
@@ -2839,7 +2839,7 @@ static const struct v4l2_file_operations zoran_fops = {
        .poll = zoran_poll,
 };
 
-struct video_device zoran_template = {
+const struct video_device zoran_template = {
        .name = ZORAN_NAME,
        .fops = &zoran_fops,
        .ioctl_ops = &zoran_ioctl_ops,