diff options
author | Lad, Prabhakar | 2014-05-16 15:33:33 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2014-05-24 00:20:02 +0200 |
commit | 999ba69bf35c6ab0bdb0bd65cb0dd67cb1b96d99 (patch) | |
tree | b9658ef278cd7f413afdaafdf13b0e35a8b18cf0 /drivers/media/platform | |
parent | [media] media: davinci: vpif_capture: drop buf_init() callback (diff) | |
download | kernel-qcow2-linux-999ba69bf35c6ab0bdb0bd65cb0dd67cb1b96d99.tar.gz kernel-qcow2-linux-999ba69bf35c6ab0bdb0bd65cb0dd67cb1b96d99.tar.xz kernel-qcow2-linux-999ba69bf35c6ab0bdb0bd65cb0dd67cb1b96d99.zip |
[media] media: davinci: vpif_capture: use vb2_ops_wait_prepare/finish helper functions
this patch makes use of vb2_ops_wait_prepare/finish helper functions.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 484d8585e11c..8572efe949c8 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -224,24 +224,6 @@ static void vpif_buf_cleanup(struct vb2_buffer *vb) } -static void vpif_wait_prepare(struct vb2_queue *vq) -{ - struct channel_obj *ch = vb2_get_drv_priv(vq); - struct common_obj *common; - - common = &ch->common[VPIF_VIDEO_INDEX]; - mutex_unlock(&common->lock); -} - -static void vpif_wait_finish(struct vb2_queue *vq) -{ - struct channel_obj *ch = vb2_get_drv_priv(vq); - struct common_obj *common; - - common = &ch->common[VPIF_VIDEO_INDEX]; - mutex_lock(&common->lock); -} - static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) { struct vpif_capture_config *vpif_config_data = @@ -374,8 +356,6 @@ static void vpif_stop_streaming(struct vb2_queue *vq) static struct vb2_ops video_qops = { .queue_setup = vpif_buffer_queue_setup, - .wait_prepare = vpif_wait_prepare, - .wait_finish = vpif_wait_finish, .buf_prepare = vpif_buffer_prepare, .start_streaming = vpif_start_streaming, .stop_streaming = vpif_stop_streaming, @@ -1977,6 +1957,7 @@ static int vpif_probe_complete(void) q->buf_struct_size = sizeof(struct vpif_cap_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 1; + q->lock = &common->lock; err = vb2_queue_init(q); if (err) { |