diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-02-15 18:41:51 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-08 20:40:50 +0300 |
commit | 1ad70ced1bdafa93938caf57edc2de2b461c539b (patch) | |
tree | 7e8156365fae544f2512da5f6cd29c1b44242aba /drivers/media/platform/omap3isp/ispvideo.c | |
parent | dce57314b53760b6f9190c98287ce8f89c80d233 (diff) | |
download | linux-1ad70ced1bdafa93938caf57edc2de2b461c539b.tar.xz |
[media] media/platform: convert drivers to use the new vb2_queue dev field
Stop using alloc_ctx and just fill in the device pointer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispvideo.c')
-rw-r--r-- | drivers/media/platform/omap3isp/ispvideo.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 1b1a95d546f6..486b8754110f 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -342,8 +342,6 @@ static int isp_video_queue_setup(struct vb2_queue *queue, if (sizes[0] == 0) return -EINVAL; - alloc_ctxs[0] = video->alloc_ctx; - *count = min(*count, video->capture_mem / PAGE_ALIGN(sizes[0])); return 0; @@ -1308,6 +1306,7 @@ static int isp_video_open(struct file *file) queue->mem_ops = &vb2_dma_contig_memops; queue->buf_struct_size = sizeof(struct isp_buffer); queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; + queue->dev = video->isp->dev; ret = vb2_queue_init(&handle->queue); if (ret < 0) { @@ -1414,15 +1413,9 @@ int omap3isp_video_init(struct isp_video *video, const char *name) return -EINVAL; } - video->alloc_ctx = vb2_dma_contig_init_ctx(video->isp->dev); - if (IS_ERR(video->alloc_ctx)) - return PTR_ERR(video->alloc_ctx); - ret = media_entity_pads_init(&video->video.entity, 1, &video->pad); - if (ret < 0) { - vb2_dma_contig_cleanup_ctx(video->alloc_ctx); + if (ret < 0) return ret; - } mutex_init(&video->mutex); atomic_set(&video->active, 0); @@ -1451,7 +1444,6 @@ int omap3isp_video_init(struct isp_video *video, const char *name) void omap3isp_video_cleanup(struct isp_video *video) { - vb2_dma_contig_cleanup_ctx(video->alloc_ctx); media_entity_cleanup(&video->video.entity); mutex_destroy(&video->queue_lock); mutex_destroy(&video->stream_lock); |