Commit 6bcc0516 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Mauro Carvalho Chehab

media: media/platform: add const to v4l2_file_operations structures

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 177894bf
...@@ -769,7 +769,7 @@ static const struct v4l2_ioctl_ops bcap_ioctl_ops = { ...@@ -769,7 +769,7 @@ static const struct v4l2_ioctl_ops bcap_ioctl_ops = {
.vidioc_log_status = bcap_log_status, .vidioc_log_status = bcap_log_status,
}; };
static struct v4l2_file_operations bcap_fops = { static const struct v4l2_file_operations bcap_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = v4l2_fh_open, .open = v4l2_fh_open,
.release = vb2_fop_release, .release = vb2_fop_release,
......
...@@ -1275,7 +1275,7 @@ static const struct v4l2_ioctl_ops vpbe_ioctl_ops = { ...@@ -1275,7 +1275,7 @@ static const struct v4l2_ioctl_ops vpbe_ioctl_ops = {
.vidioc_enum_dv_timings = vpbe_display_enum_dv_timings, .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, .owner = THIS_MODULE,
.open = vpbe_display_open, .open = vpbe_display_open,
.release = vpbe_display_release, .release = vpbe_display_release,
......
...@@ -1344,7 +1344,7 @@ static const struct v4l2_ioctl_ops vpif_ioctl_ops = { ...@@ -1344,7 +1344,7 @@ static const struct v4l2_ioctl_ops vpif_ioctl_ops = {
}; };
/* vpif file operations */ /* vpif file operations */
static struct v4l2_file_operations vpif_fops = { static const struct v4l2_file_operations vpif_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = v4l2_fh_open, .open = v4l2_fh_open,
.release = vb2_fop_release, .release = vb2_fop_release,
......
...@@ -1340,7 +1340,7 @@ static int viu_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -1340,7 +1340,7 @@ static int viu_mmap(struct file *file, struct vm_area_struct *vma)
return ret; return ret;
} }
static struct v4l2_file_operations viu_fops = { static const struct v4l2_file_operations viu_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = viu_open, .open = viu_open,
.release = viu_release, .release = viu_release,
......
...@@ -820,7 +820,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt) ...@@ -820,7 +820,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt)
return res; return res;
} }
static struct v4l2_file_operations soc_camera_fops = { static const struct v4l2_file_operations soc_camera_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = soc_camera_open, .open = soc_camera_open,
.release = soc_camera_close, .release = soc_camera_close,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment