From d0b2f91bede3bd5e3d24dd6803e56eee959c1797 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 20 Oct 2016 00:10:27 -0300 Subject: Linux-libre 4.8.2-gnu --- drivers/media/platform/s3c-camif/camif-capture.c | 5 ++--- drivers/media/platform/s3c-camif/camif-core.c | 11 +---------- drivers/media/platform/s3c-camif/camif-core.h | 2 -- 3 files changed, 3 insertions(+), 15 deletions(-) (limited to 'drivers/media/platform/s3c-camif') diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c index bd060ef5d..0413a861a 100644 --- a/drivers/media/platform/s3c-camif/camif-capture.c +++ b/drivers/media/platform/s3c-camif/camif-capture.c @@ -437,10 +437,9 @@ static void stop_streaming(struct vb2_queue *vq) static int queue_setup(struct vb2_queue *vq, unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *allocators[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct camif_vp *vp = vb2_get_drv_priv(vq); - struct camif_dev *camif = vp->camif; struct camif_frame *frame = &vp->out_frame; const struct camif_fmt *fmt = vp->out_fmt; unsigned int size; @@ -449,7 +448,6 @@ static int queue_setup(struct vb2_queue *vq, return -EINVAL; size = (frame->f_width * frame->f_height * fmt->depth) / 8; - allocators[0] = camif->alloc_ctx; if (*num_planes) return sizes[0] < size ? -EINVAL : 0; @@ -1138,6 +1136,7 @@ int s3c_camif_register_video_node(struct camif_dev *camif, int idx) q->drv_priv = vp; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->lock = &vp->camif->lock; + q->dev = camif->v4l2_dev.dev; ret = vb2_queue_init(q); if (ret) diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c index af237af20..ec4001970 100644 --- a/drivers/media/platform/s3c-camif/camif-core.c +++ b/drivers/media/platform/s3c-camif/camif-core.c @@ -474,16 +474,9 @@ static int s3c_camif_probe(struct platform_device *pdev) if (ret < 0) goto err_pm; - /* Initialize contiguous memory allocator */ - camif->alloc_ctx = vb2_dma_contig_init_ctx(dev); - if (IS_ERR(camif->alloc_ctx)) { - ret = PTR_ERR(camif->alloc_ctx); - goto err_alloc; - } - ret = camif_media_dev_init(camif); if (ret < 0) - goto err_mdev; + goto err_alloc; ret = camif_register_sensor(camif); if (ret < 0) @@ -517,8 +510,6 @@ err_sens: media_device_unregister(&camif->media_dev); media_device_cleanup(&camif->media_dev); camif_unregister_media_entities(camif); -err_mdev: - vb2_dma_contig_cleanup_ctx(camif->alloc_ctx); err_alloc: pm_runtime_put(dev); pm_runtime_disable(dev); diff --git a/drivers/media/platform/s3c-camif/camif-core.h b/drivers/media/platform/s3c-camif/camif-core.h index 57cbc3d97..1f5c8c94c 100644 --- a/drivers/media/platform/s3c-camif/camif-core.h +++ b/drivers/media/platform/s3c-camif/camif-core.h @@ -254,7 +254,6 @@ struct camif_vp { * @ctrl_handler: v4l2 control handler (owned by @subdev) * @test_pattern: test pattern controls * @vp: video path (DMA) description (codec/preview) - * @alloc_ctx: memory buffer allocator context * @variant: variant information for this device * @dev: pointer to the CAMIF device struct * @pdata: a copy of the driver's platform data @@ -291,7 +290,6 @@ struct camif_dev { u8 colorfx_cr; struct camif_vp vp[CAMIF_VP_NUM]; - struct vb2_alloc_ctx *alloc_ctx; const struct s3c_camif_variant *variant; struct device *dev; -- cgit v1.2.3-54-g00ecf