Commit 586ef0c6 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Remove atomisp_css_suspend()/_resume()

atomisp_css_suspend() is a 1:1 copy of atomisp_css_uninit() and
atomisp_css_resume() is a 1:1 copy of atomisp_css_init().

Remove the 2 copies and have their one caller just call
atomisp_css_uninit() / atomisp_css_init() instead.
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 a419e3f5
......@@ -307,7 +307,7 @@ int atomisp_reset(struct atomisp_device *isp)
int ret = 0;
dev_dbg(isp->dev, "%s\n", __func__);
atomisp_css_suspend(isp);
atomisp_css_uninit(isp);
ret = atomisp_runtime_suspend(isp->dev);
if (ret < 0)
dev_err(isp->dev, "atomisp_runtime_suspend failed, %d\n", ret);
......@@ -316,7 +316,7 @@ int atomisp_reset(struct atomisp_device *isp)
if (ret < 0)
dev_err(isp->dev, "atomisp_runtime_resume failed, %d\n", ret);
ret = atomisp_css_resume(isp);
ret = atomisp_css_init(isp);
if (ret)
isp->isp_fatal_error = true;
......
......@@ -41,10 +41,6 @@ int atomisp_css_init(struct atomisp_device *isp);
void atomisp_css_uninit(struct atomisp_device *isp);
void atomisp_css_suspend(struct atomisp_device *isp);
int atomisp_css_resume(struct atomisp_device *isp);
void atomisp_css_init_struct(struct atomisp_sub_device *asd);
int atomisp_css_irq_translate(struct atomisp_device *isp,
......
......@@ -868,35 +868,6 @@ void atomisp_css_uninit(struct atomisp_device *isp)
ia_css_uninit();
}
void atomisp_css_suspend(struct atomisp_device *isp)
{
isp->css_initialized = false;
ia_css_uninit();
}
int atomisp_css_resume(struct atomisp_device *isp)
{
unsigned int mmu_base_addr;
int ret;
ret = hmm_get_mmu_base_addr(isp->dev, &mmu_base_addr);
if (ret) {
dev_err(isp->dev, "get base address error.\n");
return -EINVAL;
}
ret = ia_css_init(isp->dev, &isp->css_env.isp_css_env, NULL,
mmu_base_addr, IA_CSS_IRQ_TYPE_PULSE);
if (ret) {
dev_err(isp->dev, "re-init css failed.\n");
return -EINVAL;
}
ia_css_enable_isys_event_queue(true);
isp->css_initialized = true;
return 0;
}
int atomisp_css_irq_translate(struct atomisp_device *isp,
unsigned int *infos)
{
......
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