diff options
author | Peter Gielda <pgielda@antmicro.com> | 2013-04-08 20:09:44 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2013-04-12 16:20:28 +0200 |
commit | 590671f265f70e6601d7bd21a3bc909f1935a047 (patch) | |
tree | 3b2d7a4068a746150ef9924e4e7ab1a5936d59e2 | |
parent | 0fc73eb175a82dc11f6c1cc8e03f1d311d3180de (diff) |
tegra_v4l2: fixed bugs in memory allocation/deallocation
-rw-r--r-- | drivers/media/video/tegra_v4l2_camera.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/tegra_v4l2_camera.c b/drivers/media/video/tegra_v4l2_camera.c index 644d0be53803..89f3ecc3c3cc 100644 --- a/drivers/media/video/tegra_v4l2_camera.c +++ b/drivers/media/video/tegra_v4l2_camera.c @@ -1613,7 +1613,7 @@ static int __devinit tegra_camera_probe(struct nvhost_device *ndev, pm_runtime_enable(&ndev->dev); pm_runtime_resume(&ndev->dev); - pcdev->alloc_ctx = vb2_dma_nvmap_init_ctx(NULL); + pcdev->alloc_ctx = vb2_dma_nvmap_init_ctx(pcdev->ici.v4l2_dev.dev); if (IS_ERR(pcdev->alloc_ctx)) { err = PTR_ERR(pcdev->alloc_ctx); goto exit_put_resources; @@ -1628,7 +1628,7 @@ static int __devinit tegra_camera_probe(struct nvhost_device *ndev, return err; exit_cleanup_alloc_ctx: - vb2_dma_nvmap_cleanup_ctx(&ndev->dev); + vb2_dma_nvmap_cleanup_ctx(pcdev->alloc_ctx); exit_put_resources: pm_runtime_disable(&ndev->dev); nvhost_client_device_put_resources(ndev); @@ -1661,7 +1661,7 @@ static int __devexit tegra_camera_remove(struct nvhost_device *ndev) soc_camera_host_unregister(ici); - vb2_dma_nvmap_cleanup_ctx(&ndev->dev); + vb2_dma_nvmap_cleanup_ctx(pcdev->alloc_ctx); pm_runtime_disable(&ndev->dev); |