diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-05 04:10:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-26 10:02:25 -0400 |
commit | 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86 (patch) | |
tree | f2ba0120024627256917dc05a2d7c509ac056011 /include/media | |
parent | 3f70e1f598a6be4277e71516a98457fd3bddfbd0 (diff) |
[media] v4l2: make vidioc_s_crop const
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_crop.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/soc_camera.h | 4 | ||||
-rw-r--r-- | include/media/v4l2-ioctl.h | 2 | ||||
-rw-r--r-- | include/media/v4l2-subdev.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 435e7b8ad1c3..6442edc2a151 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -85,14 +85,14 @@ struct soc_camera_host_ops { | |||
85 | void (*put_formats)(struct soc_camera_device *); | 85 | void (*put_formats)(struct soc_camera_device *); |
86 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); | 86 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); |
87 | int (*get_crop)(struct soc_camera_device *, struct v4l2_crop *); | 87 | int (*get_crop)(struct soc_camera_device *, struct v4l2_crop *); |
88 | int (*set_crop)(struct soc_camera_device *, struct v4l2_crop *); | 88 | int (*set_crop)(struct soc_camera_device *, const struct v4l2_crop *); |
89 | int (*get_selection)(struct soc_camera_device *, struct v4l2_selection *); | 89 | int (*get_selection)(struct soc_camera_device *, struct v4l2_selection *); |
90 | int (*set_selection)(struct soc_camera_device *, struct v4l2_selection *); | 90 | int (*set_selection)(struct soc_camera_device *, struct v4l2_selection *); |
91 | /* | 91 | /* |
92 | * The difference to .set_crop() is, that .set_livecrop is not allowed | 92 | * The difference to .set_crop() is, that .set_livecrop is not allowed |
93 | * to change the output sizes | 93 | * to change the output sizes |
94 | */ | 94 | */ |
95 | int (*set_livecrop)(struct soc_camera_device *, struct v4l2_crop *); | 95 | int (*set_livecrop)(struct soc_camera_device *, const struct v4l2_crop *); |
96 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); | 96 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); |
97 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); | 97 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |
98 | void (*init_videobuf)(struct videobuf_queue *, | 98 | void (*init_videobuf)(struct videobuf_queue *, |
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index fbeb00e2c109..e48b571ca37d 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -186,7 +186,7 @@ struct v4l2_ioctl_ops { | |||
186 | int (*vidioc_g_crop) (struct file *file, void *fh, | 186 | int (*vidioc_g_crop) (struct file *file, void *fh, |
187 | struct v4l2_crop *a); | 187 | struct v4l2_crop *a); |
188 | int (*vidioc_s_crop) (struct file *file, void *fh, | 188 | int (*vidioc_s_crop) (struct file *file, void *fh, |
189 | struct v4l2_crop *a); | 189 | const struct v4l2_crop *a); |
190 | int (*vidioc_g_selection) (struct file *file, void *fh, | 190 | int (*vidioc_g_selection) (struct file *file, void *fh, |
191 | struct v4l2_selection *s); | 191 | struct v4l2_selection *s); |
192 | int (*vidioc_s_selection) (struct file *file, void *fh, | 192 | int (*vidioc_s_selection) (struct file *file, void *fh, |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index e698f2cead4e..2ecd7377153b 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -286,7 +286,7 @@ struct v4l2_subdev_video_ops { | |||
286 | int (*s_stream)(struct v4l2_subdev *sd, int enable); | 286 | int (*s_stream)(struct v4l2_subdev *sd, int enable); |
287 | int (*cropcap)(struct v4l2_subdev *sd, struct v4l2_cropcap *cc); | 287 | int (*cropcap)(struct v4l2_subdev *sd, struct v4l2_cropcap *cc); |
288 | int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); | 288 | int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); |
289 | int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); | 289 | int (*s_crop)(struct v4l2_subdev *sd, const struct v4l2_crop *crop); |
290 | int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | 290 | int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); |
291 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | 291 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); |
292 | int (*g_frame_interval)(struct v4l2_subdev *sd, | 292 | int (*g_frame_interval)(struct v4l2_subdev *sd, |