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

Cross compiled bfin_capture.o for blackfin arch. vpbe_display.o file did
not cross compile for arm. Could not find any architecture matching the
configuraion symbol for fsl-viu.c file.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/blackfin/bfin_capture.c
drivers/media/platform/davinci/vpbe_display.c
drivers/media/platform/davinci/vpif_capture.c
drivers/media/platform/fsl-viu.c
drivers/media/platform/soc_camera/soc_camera.c

index 1c5166df46f58dfd07a246672b907815643119db..294d696c4a3b48e3e374d4a4068687e9cd03b92d 100644 (file)
@@ -769,7 +769,7 @@ static const struct v4l2_ioctl_ops bcap_ioctl_ops = {
        .vidioc_log_status       = bcap_log_status,
 };
 
-static struct v4l2_file_operations bcap_fops = {
+static const struct v4l2_file_operations bcap_fops = {
        .owner = THIS_MODULE,
        .open = v4l2_fh_open,
        .release = vb2_fop_release,
index a9bc0175e4d3df2a89f6b768834af9ceb3c8d670..ca2adfa565f634deb842cf7fde9a82caf05e7a23 100644 (file)
@@ -1275,7 +1275,7 @@ static const struct v4l2_ioctl_ops vpbe_ioctl_ops = {
        .vidioc_enum_dv_timings  = vpbe_display_enum_dv_timings,
 };
 
-static struct v4l2_file_operations vpbe_fops = {
+static const struct v4l2_file_operations vpbe_fops = {
        .owner = THIS_MODULE,
        .open = vpbe_display_open,
        .release = vpbe_display_release,
index 4be6554c56c5245fc75eb99c22ba2be9d386a33f..46c0257fb24921658beb23a1b3265569696f1281 100644 (file)
@@ -1344,7 +1344,7 @@ static const struct v4l2_ioctl_ops vpif_ioctl_ops = {
 };
 
 /* vpif file operations */
-static struct v4l2_file_operations vpif_fops = {
+static const struct v4l2_file_operations vpif_fops = {
        .owner = THIS_MODULE,
        .open = v4l2_fh_open,
        .release = vb2_fop_release,
index 97e164b2075a4ffebc53dbba66ef5e355845e72a..f7b88e58d00e198472cc91c9bddcfa8cf23b39db 100644 (file)
@@ -1340,7 +1340,7 @@ static int viu_mmap(struct file *file, struct vm_area_struct *vma)
        return ret;
 }
 
-static struct v4l2_file_operations viu_fops = {
+static const struct v4l2_file_operations viu_fops = {
        .owner          = THIS_MODULE,
        .open           = viu_open,
        .release        = viu_release,
index 45a0429d75bbd843b5f22dac13215be7be396317..dd349efae3af64f8c3ec76963f782ca5b084da3d 100644 (file)
@@ -820,7 +820,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt)
        return res;
 }
 
-static struct v4l2_file_operations soc_camera_fops = {
+static const struct v4l2_file_operations soc_camera_fops = {
        .owner          = THIS_MODULE,
        .open           = soc_camera_open,
        .release        = soc_camera_close,