diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-07-08 22:11:18 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-08 22:16:51 +0300 |
commit | 556f44087b649531f234d7d6b37281120dfe6b9e (patch) | |
tree | 509147c147a8f4b01039b5a7a3ffb97b3b626295 /drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | |
parent | d7e92e15e92fc987640772bf110586898b5f15aa (diff) | |
download | linux-556f44087b649531f234d7d6b37281120dfe6b9e.tar.xz |
[media] mtk-vcodec: convert driver to use the new vb2_queue dev field
The patch dropping the vb2_dma_contig_init_ctx() and _cleanup_ctx()
functions was already applied before this driver was added. So convert
this driver as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c')
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c index 06105e94c284..9c10cc24a5b1 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c @@ -357,14 +357,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev) dev->vfd_enc = vfd_enc; platform_set_drvdata(pdev, dev); - dev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev); - if (IS_ERR((__force void *)dev->alloc_ctx)) { - mtk_v4l2_err("Failed to alloc vb2 dma context 0"); - ret = PTR_ERR((__force void *)dev->alloc_ctx); - dev->alloc_ctx = NULL; - goto err_vb2_ctx_init; - } - dev->m2m_dev_enc = v4l2_m2m_init(&mtk_venc_m2m_ops); if (IS_ERR((__force void *)dev->m2m_dev_enc)) { mtk_v4l2_err("Failed to init mem2mem enc device"); @@ -401,8 +393,6 @@ err_enc_reg: err_event_workq: v4l2_m2m_release(dev->m2m_dev_enc); err_enc_mem_init: - vb2_dma_contig_cleanup_ctx(dev->alloc_ctx); -err_vb2_ctx_init: video_unregister_device(vfd_enc); err_enc_alloc: v4l2_device_unregister(&dev->v4l2_dev); @@ -426,8 +416,6 @@ static int mtk_vcodec_enc_remove(struct platform_device *pdev) destroy_workqueue(dev->encode_workqueue); if (dev->m2m_dev_enc) v4l2_m2m_release(dev->m2m_dev_enc); - if (dev->alloc_ctx) - vb2_dma_contig_cleanup_ctx(dev->alloc_ctx); if (dev->vfd_enc) video_unregister_device(dev->vfd_enc); |