summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/platform/mxc/subdev/mx6s_capture.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/media/platform/mxc/subdev/mx6s_capture.c b/drivers/media/platform/mxc/subdev/mx6s_capture.c
index 6f7ea3cbd213..1f6d74d2a929 100644
--- a/drivers/media/platform/mxc/subdev/mx6s_capture.c
+++ b/drivers/media/platform/mxc/subdev/mx6s_capture.c
@@ -1063,6 +1063,8 @@ static int mx6s_csi_open(struct file *file)
pm_runtime_get_sync(csi_dev->dev);
+ request_bus_freq(BUS_FREQ_HIGH);
+
mx6s_csi_init(csi_dev);
mutex_unlock(&csi_dev->lock);
@@ -1090,6 +1092,8 @@ static int mx6s_csi_close(struct file *file)
file->private_data = NULL;
+ release_bus_freq(BUS_FREQ_HIGH);
+
pm_runtime_put_sync_suspend(csi_dev->dev);
return 0;
}
@@ -1701,22 +1705,14 @@ static int mx6s_csi_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_RUNTIME
static int mx6s_csi_runtime_suspend(struct device *dev)
{
- int ret = 0;
-
- release_bus_freq(BUS_FREQ_HIGH);
dev_dbg(dev, "csi v4l2 busfreq high release.\n");
-
- return ret;
+ return 0;
}
static int mx6s_csi_runtime_resume(struct device *dev)
{
- int ret = 0;
-
- request_bus_freq(BUS_FREQ_HIGH);
dev_dbg(dev, "csi v4l2 busfreq high request.\n");
-
- return ret;
+ return 0;
}
#else
#define mx6s_csi_runtime_suspend NULL