aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-04 10:46:09 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-26 09:48:52 -0400
commit85f5fe3962ca6780e5368feffe32f3b15e953e1f (patch)
treee3a5441ee86e62d3ca8423308f32c7a32ae68677 /include/media
parentec6f4328108f1c83d5ac907c0d978fa886ef9627 (diff)
[media] v4l2: make vidioc_(un)subscribe_event const
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_(un)subscribe_event. 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/v4l2-ctrls.h2
-rw-r--r--include/media/v4l2-event.h4
-rw-r--r--include/media/v4l2-ioctl.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 7ef6b27d450f..6890f5e11ad0 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -546,7 +546,7 @@ int v4l2_ctrl_log_status(struct file *file, void *fh);
546/* Can be used as a vidioc_subscribe_event function that just subscribes 546/* Can be used as a vidioc_subscribe_event function that just subscribes
547 control events. */ 547 control events. */
548int v4l2_ctrl_subscribe_event(struct v4l2_fh *fh, 548int v4l2_ctrl_subscribe_event(struct v4l2_fh *fh,
549 struct v4l2_event_subscription *sub); 549 const struct v4l2_event_subscription *sub);
550 550
551/* Can be used as a poll function that just polls for control events. */ 551/* Can be used as a poll function that just polls for control events. */
552unsigned int v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait); 552unsigned int v4l2_ctrl_poll(struct file *file, struct poll_table_struct *wait);
diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h
index 2885a810a128..e7c5d170a9cd 100644
--- a/include/media/v4l2-event.h
+++ b/include/media/v4l2-event.h
@@ -124,10 +124,10 @@ void v4l2_event_queue(struct video_device *vdev, const struct v4l2_event *ev);
124void v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev); 124void v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev);
125int v4l2_event_pending(struct v4l2_fh *fh); 125int v4l2_event_pending(struct v4l2_fh *fh);
126int v4l2_event_subscribe(struct v4l2_fh *fh, 126int v4l2_event_subscribe(struct v4l2_fh *fh,
127 struct v4l2_event_subscription *sub, unsigned elems, 127 const struct v4l2_event_subscription *sub, unsigned elems,
128 const struct v4l2_subscribed_event_ops *ops); 128 const struct v4l2_subscribed_event_ops *ops);
129int v4l2_event_unsubscribe(struct v4l2_fh *fh, 129int v4l2_event_unsubscribe(struct v4l2_fh *fh,
130 struct v4l2_event_subscription *sub); 130 const struct v4l2_event_subscription *sub);
131void v4l2_event_unsubscribe_all(struct v4l2_fh *fh); 131void v4l2_event_unsubscribe_all(struct v4l2_fh *fh);
132 132
133#endif /* V4L2_EVENT_H */ 133#endif /* V4L2_EVENT_H */
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 865f95d92ba8..3eef4de0ca33 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -273,9 +273,9 @@ struct v4l2_ioctl_ops {
273 struct v4l2_dv_timings_cap *cap); 273 struct v4l2_dv_timings_cap *cap);
274 274
275 int (*vidioc_subscribe_event) (struct v4l2_fh *fh, 275 int (*vidioc_subscribe_event) (struct v4l2_fh *fh,
276 struct v4l2_event_subscription *sub); 276 const struct v4l2_event_subscription *sub);
277 int (*vidioc_unsubscribe_event)(struct v4l2_fh *fh, 277 int (*vidioc_unsubscribe_event)(struct v4l2_fh *fh,
278 struct v4l2_event_subscription *sub); 278 const struct v4l2_event_subscription *sub);
279 279
280 /* For other private ioctls */ 280 /* For other private ioctls */
281 long (*vidioc_default) (struct file *file, void *fh, 281 long (*vidioc_default) (struct file *file, void *fh,