Skip to contentSkip to conversation

zoran: make zoran_template const

PATCH New Bhumika Goyal 1 participant 1 message Sep 27, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 zoran: make zoran_template const

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.

---
Changes in v2:
* Fix spelling mistake in the commit message.

 drivers/media/pci/zoran/zoran_card.h   | 2 +-
 drivers/media/pci/zoran/zoran_driver.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/pci/zoran/zoran_card.h +1 -1
index 81cba17..0cdb7d3 100644
@@ -37,7 +37,7 @@
 /* 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,
drivers/media/pci/zoran/zoran_driver.c +1 -1
index a11cb50..d078400 100644
@@ -2839,7 +2839,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh,
 	.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,
Signature · 1 line
1.9.1