Commit 24aba582 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Remove double atomisp_mrfld_power_down()/_up() calls from atomisp_reset()

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().
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f5cb5ada
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment