summaryrefslogtreecommitdiff
path: root/drivers/media/video/tegra/tegra_camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tegra/tegra_camera.c')
-rw-r--r--drivers/media/video/tegra/tegra_camera.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/tegra/tegra_camera.c b/drivers/media/video/tegra/tegra_camera.c
index 309ddc4a47d2..30990d252291 100644
--- a/drivers/media/video/tegra/tegra_camera.c
+++ b/drivers/media/video/tegra/tegra_camera.c
@@ -362,9 +362,11 @@ static int tegra_camera_release(struct inode *inode, struct file *file)
/* If camera blocks are not powergated yet, do it now */
if (dev->power_refcnt > 0) {
mutex_lock(&dev->tegra_camera_lock);
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
err = tegra_powergate_partition(TEGRA_POWERGATE_VENC);
if (err)
dev_err(dev->dev, "%s: powergate failed.\n", __func__);
+#endif
dev->power_refcnt = 0;
mutex_unlock(&dev->tegra_camera_lock);
}
@@ -410,11 +412,13 @@ static int tegra_camera_probe(struct platform_device *pdev)
mutex_init(&dev->tegra_camera_lock);
/* Powergate VE when boot */
- dev->power_refcnt = 0;
mutex_lock(&dev->tegra_camera_lock);
+ dev->power_refcnt = 0;
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
err = tegra_powergate_partition(TEGRA_POWERGATE_VENC);
if (err)
dev_err(&pdev->dev, "%s: powergate failed.\n", __func__);
+#endif
mutex_unlock(&dev->tegra_camera_lock);
dev->dev = &pdev->dev;