mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] [media] zoran: make zoran_template const
@ 2017-09-27 14:16 Bhumika Goyal
  0 siblings, 0 replies; only message in thread
From: Bhumika Goyal @ 2017-09-27 14:16 UTC (permalink / raw)
  To: julia.lawall, mchehab, mjpeg-users, linux-media, linux-kernel
  Cc: Bhumika Goyal

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>
---
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(-)

diff --git a/drivers/media/pci/zoran/zoran_card.h b/drivers/media/pci/zoran/zoran_card.h
index 81cba17..0cdb7d3 100644
--- a/drivers/media/pci/zoran/zoran_card.h
+++ b/drivers/media/pci/zoran/zoran_card.h
@@ -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,
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
index a11cb50..d078400 100644
--- a/drivers/media/pci/zoran/zoran_driver.c
+++ b/drivers/media/pci/zoran/zoran_driver.c
@@ -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,
-- 
1.9.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-27 14:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 14:16 [PATCH v2] [media] zoran: make zoran_template const Bhumika Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®