diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-04 10:46:09 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-26 09:48:52 -0400 |
commit | 85f5fe3962ca6780e5368feffe32f3b15e953e1f (patch) | |
tree | e3a5441ee86e62d3ca8423308f32c7a32ae68677 /drivers/media/platform/omap3isp | |
parent | ec6f4328108f1c83d5ac907c0d978fa886ef9627 (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 'drivers/media/platform/omap3isp')
-rw-r--r-- | drivers/media/platform/omap3isp/ispccdc.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/omap3isp/ispstat.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/omap3isp/ispstat.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index aa9df9d71a7b..60181ab96063 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c | |||
@@ -1706,7 +1706,7 @@ static long ccdc_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) | |||
1706 | } | 1706 | } |
1707 | 1707 | ||
1708 | static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, | 1708 | static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, |
1709 | struct v4l2_event_subscription *sub) | 1709 | const struct v4l2_event_subscription *sub) |
1710 | { | 1710 | { |
1711 | if (sub->type != V4L2_EVENT_FRAME_SYNC) | 1711 | if (sub->type != V4L2_EVENT_FRAME_SYNC) |
1712 | return -EINVAL; | 1712 | return -EINVAL; |
@@ -1719,7 +1719,7 @@ static int ccdc_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, | |||
1719 | } | 1719 | } |
1720 | 1720 | ||
1721 | static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, | 1721 | static int ccdc_unsubscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh, |
1722 | struct v4l2_event_subscription *sub) | 1722 | const struct v4l2_event_subscription *sub) |
1723 | { | 1723 | { |
1724 | return v4l2_event_unsubscribe(fh, sub); | 1724 | return v4l2_event_unsubscribe(fh, sub); |
1725 | } | 1725 | } |
diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c index b8640be692f1..d7ac76b5c2ae 100644 --- a/drivers/media/platform/omap3isp/ispstat.c +++ b/drivers/media/platform/omap3isp/ispstat.c | |||
@@ -1025,7 +1025,7 @@ void omap3isp_stat_dma_isr(struct ispstat *stat) | |||
1025 | 1025 | ||
1026 | int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev, | 1026 | int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev, |
1027 | struct v4l2_fh *fh, | 1027 | struct v4l2_fh *fh, |
1028 | struct v4l2_event_subscription *sub) | 1028 | const struct v4l2_event_subscription *sub) |
1029 | { | 1029 | { |
1030 | struct ispstat *stat = v4l2_get_subdevdata(subdev); | 1030 | struct ispstat *stat = v4l2_get_subdevdata(subdev); |
1031 | 1031 | ||
@@ -1037,7 +1037,7 @@ int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev, | |||
1037 | 1037 | ||
1038 | int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev, | 1038 | int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev, |
1039 | struct v4l2_fh *fh, | 1039 | struct v4l2_fh *fh, |
1040 | struct v4l2_event_subscription *sub) | 1040 | const struct v4l2_event_subscription *sub) |
1041 | { | 1041 | { |
1042 | return v4l2_event_unsubscribe(fh, sub); | 1042 | return v4l2_event_unsubscribe(fh, sub); |
1043 | } | 1043 | } |
diff --git a/drivers/media/platform/omap3isp/ispstat.h b/drivers/media/platform/omap3isp/ispstat.h index 9b7c8654dc8a..a6fe653eb237 100644 --- a/drivers/media/platform/omap3isp/ispstat.h +++ b/drivers/media/platform/omap3isp/ispstat.h | |||
@@ -147,10 +147,10 @@ int omap3isp_stat_init(struct ispstat *stat, const char *name, | |||
147 | void omap3isp_stat_cleanup(struct ispstat *stat); | 147 | void omap3isp_stat_cleanup(struct ispstat *stat); |
148 | int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev, | 148 | int omap3isp_stat_subscribe_event(struct v4l2_subdev *subdev, |
149 | struct v4l2_fh *fh, | 149 | struct v4l2_fh *fh, |
150 | struct v4l2_event_subscription *sub); | 150 | const struct v4l2_event_subscription *sub); |
151 | int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev, | 151 | int omap3isp_stat_unsubscribe_event(struct v4l2_subdev *subdev, |
152 | struct v4l2_fh *fh, | 152 | struct v4l2_fh *fh, |
153 | struct v4l2_event_subscription *sub); | 153 | const struct v4l2_event_subscription *sub); |
154 | int omap3isp_stat_s_stream(struct v4l2_subdev *subdev, int enable); | 154 | int omap3isp_stat_s_stream(struct v4l2_subdev *subdev, int enable); |
155 | 155 | ||
156 | int omap3isp_stat_busy(struct ispstat *stat); | 156 | int omap3isp_stat_busy(struct ispstat *stat); |