@@ -311,17 +311,11 @@ int atomisp_reset(struct atomisp_device *isp)
ret = atomisp_runtime_suspend(isp->dev);
if (ret < 0)
dev_err(isp->dev, "atomisp_runtime_suspend failed, %d\n", ret);
- ret = atomisp_mrfld_power_down(isp);
- if (ret < 0) {
- dev_err(isp->dev, "can not disable ISP power\n");
- } else {
- ret = atomisp_mrfld_power_up(isp);
- if (ret < 0)
- dev_err(isp->dev, "can not enable ISP power\n");
- ret = atomisp_runtime_resume(isp->dev);
- if (ret < 0)
- dev_err(isp->dev, "atomisp_runtime_resume failed, %d\n", ret);
- }
+
+ ret = atomisp_runtime_resume(isp->dev);
+ if (ret < 0)
+ dev_err(isp->dev, "atomisp_runtime_resume failed, %d\n", ret);
+
ret = atomisp_css_resume(isp);
if (ret)
isp->isp_fatal_error = true;
@@ -341,8 +341,6 @@ int atomisp_inject_a_fake_event(struct atomisp_sub_device *asd, int *event);
int atomisp_get_invalid_frame_num(struct video_device *vdev,
int *invalid_frame_num);
-int atomisp_mrfld_power_up(struct atomisp_device *isp);
-int atomisp_mrfld_power_down(struct atomisp_device *isp);
int atomisp_runtime_suspend(struct device *dev);
int atomisp_runtime_resume(struct device *dev);
#endif /* __ATOMISP_CMD_H__ */
@@ -725,13 +725,13 @@ static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
}
/* Workaround for pmu_nc_set_power_state not ready in MRFLD */
-int atomisp_mrfld_power_down(struct atomisp_device *isp)
+static int atomisp_mrfld_power_down(struct atomisp_device *isp)
{
return atomisp_mrfld_power(isp, false);
}
/* Workaround for pmu_nc_set_power_state not ready in MRFLD */
-int atomisp_mrfld_power_up(struct atomisp_device *isp)
+static int atomisp_mrfld_power_up(struct atomisp_device *isp)
{
return atomisp_mrfld_power(isp, true);
}
atomisp_reset() calls atomisp_mrfld_power_down() after calling atomisp_runtime_suspend(), which already calls atomisp_mrfld_power_down() itself. And the some goes for atomisp_runtime_resume() / atomisp_mrfld_power_up(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 16 +++++----------- drivers/staging/media/atomisp/pci/atomisp_cmd.h | 2 -- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ++-- 3 files changed, 7 insertions(+), 15 deletions(-)