diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2014-05-16 10:33:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 19:00:54 -0300 |
commit | d10ed5c1906e708e6a9fc26e9dd25b479b5439e9 (patch) | |
tree | fb66352334aaa33a645775936fea94b74b89a6ea | |
parent | 26279364563019914b97f7e909e7682d8020b7a1 (diff) | |
download | linux-d10ed5c1906e708e6a9fc26e9dd25b479b5439e9.tar.gz linux-d10ed5c1906e708e6a9fc26e9dd25b479b5439e9.tar.bz2 linux-d10ed5c1906e708e6a9fc26e9dd25b479b5439e9.zip |
[media] media: davinci: vpif_display: 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>
-rw-r--r-- | drivers/media/platform/davinci/vpif_display.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index e2102eaa687d..8bb9f022d225 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -187,24 +187,6 @@ static void vpif_buf_cleanup(struct vb2_buffer *vb) spin_unlock_irqrestore(&common->irqlock, flags); } -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 u8 channel_first_int[VPIF_NUMOBJECTS][2] = { {1, 1} }; static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) @@ -339,8 +321,8 @@ 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, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, .buf_prepare = vpif_buffer_prepare, .start_streaming = vpif_start_streaming, .stop_streaming = vpif_stop_streaming, @@ -1649,6 +1631,7 @@ static int vpif_probe_complete(void) q->buf_struct_size = sizeof(struct vpif_disp_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) { |