media: cx23885: add const to v4l2_file_operations structure
authorBhumika Goyal <bhumirks@gmail.com>
Thu, 29 Jun 2017 08:59:19 +0000 (04:59 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Jul 2017 18:56:41 +0000 (14:56 -0400)
Declare v4l2_file_operations structure as const as it is only stored
in the fops field of video_device structure. This field is of type
const, so declare v4l2_file_operations structures with similar properties
as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/cx23885/cx23885-417.c

index 2ff1d1e274be45acf04591b62c9d0df4415542d1..a71f3c7569ce3fb9b331cc5f0ba8a1298816b54f 100644 (file)
@@ -1416,7 +1416,7 @@ static int vidioc_log_status(struct file *file, void *priv)
        return 0;
 }
 
-static struct v4l2_file_operations mpeg_fops = {
+static const struct v4l2_file_operations mpeg_fops = {
        .owner         = THIS_MODULE,
        .open           = v4l2_fh_open,
        .release        = vb2_fop_release,