summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2015-01-21 13:33:01 +0800
committerSandor Yu <R01008@freescale.com>2015-01-22 11:15:51 +0800
commitea69614be0901ece0fe8fd735104b8a3d09c1d6d (patch)
tree5684c0e542849d9072e718229661f2dacab395b6 /drivers/media
parentd73d623538fb540d9ca95808f0c4e0c777148adc (diff)
MLK-10117-3:csi: remove runtime suspend/resume function
CSI v4l2 capture driver have involved to generic pm domain, runtime_suspend/resume function will been called when system suspend/resume. It will cause request_bus_freq/release_bus_freq called counter mismatch. So move request_bus_freq/release_bus_freq function to device open/close function. Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/media')
-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