]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: cx23885/saa7134: make vb2_ops const
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 27 Sep 2017 16:59:06 +0000 (18:59 +0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 27 Oct 2017 12:12:44 +0000 (14:12 +0200)
Make vb2_ops const as they are only stored in the const field of a
vb2_queue structure. Make the declarations 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/cx23885/cx23885-vbi.c
drivers/media/pci/cx23885/cx23885.h
drivers/media/pci/saa7134/saa7134-vbi.c
drivers/media/pci/saa7134/saa7134.h

index 369e545cac0418124a7c6e23f1b3756a3337f644..70f9f13bded32251a8c2f0206215e451e4dd7d6d 100644 (file)
@@ -254,7 +254,7 @@ static void cx23885_stop_streaming(struct vb2_queue *q)
 }
 
 
-struct vb2_ops cx23885_vbi_qops = {
+const struct vb2_ops cx23885_vbi_qops = {
        .queue_setup    = queue_setup,
        .buf_prepare  = buffer_prepare,
        .buf_finish = buffer_finish,
index cb714ab60d69e182bcf8da6c76e1d5b9a1733d8e..6aab713e047668444e8756595ff19edc1901dba5 100644 (file)
@@ -591,7 +591,7 @@ int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm);
 extern int cx23885_vbi_fmt(struct file *file, void *priv,
        struct v4l2_format *f);
 extern void cx23885_vbi_timeout(unsigned long data);
-extern struct vb2_ops cx23885_vbi_qops;
+extern const struct vb2_ops cx23885_vbi_qops;
 extern int cx23885_vbi_irq(struct cx23885_dev *dev, u32 status);
 
 /* cx23885-i2c.c                                                */
index bcad9b2d9bb390a30215939473b1d0211c52bb05..07a397bb775dca438d1b66e673de221875b60701 100644 (file)
@@ -165,7 +165,7 @@ static int buffer_init(struct vb2_buffer *vb2)
        return 0;
 }
 
-struct vb2_ops saa7134_vbi_qops = {
+const struct vb2_ops saa7134_vbi_qops = {
        .queue_setup    = queue_setup,
        .buf_init       = buffer_init,
        .buf_prepare    = buffer_prepare,
index 816b5282d6710639f2869e15e7fda9c4037b38b3..545f7ad8b16d6cfe220dce59923a4363140ca0d7 100644 (file)
@@ -870,7 +870,7 @@ int saa7134_ts_stop(struct saa7134_dev *dev);
 /* ----------------------------------------------------------- */
 /* saa7134-vbi.c                                               */
 
-extern struct vb2_ops saa7134_vbi_qops;
+extern const struct vb2_ops saa7134_vbi_qops;
 extern struct video_device saa7134_vbi_template;
 
 int saa7134_vbi_init1(struct saa7134_dev *dev);