mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
drm/msm/mdp5: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20201231094935.25737-1-vulab@iscas.ac.cn Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
993247ffdd
commit
442f59b9c0
2 changed files with 10 additions and 20 deletions
|
@ -295,14 +295,11 @@ static int mdp5_disable(struct mdp5_kms *mdp5_kms)
|
||||||
mdp5_kms->enable_count--;
|
mdp5_kms->enable_count--;
|
||||||
WARN_ON(mdp5_kms->enable_count < 0);
|
WARN_ON(mdp5_kms->enable_count < 0);
|
||||||
|
|
||||||
if (mdp5_kms->tbu_rt_clk)
|
|
||||||
clk_disable_unprepare(mdp5_kms->tbu_rt_clk);
|
clk_disable_unprepare(mdp5_kms->tbu_rt_clk);
|
||||||
if (mdp5_kms->tbu_clk)
|
|
||||||
clk_disable_unprepare(mdp5_kms->tbu_clk);
|
clk_disable_unprepare(mdp5_kms->tbu_clk);
|
||||||
clk_disable_unprepare(mdp5_kms->ahb_clk);
|
clk_disable_unprepare(mdp5_kms->ahb_clk);
|
||||||
clk_disable_unprepare(mdp5_kms->axi_clk);
|
clk_disable_unprepare(mdp5_kms->axi_clk);
|
||||||
clk_disable_unprepare(mdp5_kms->core_clk);
|
clk_disable_unprepare(mdp5_kms->core_clk);
|
||||||
if (mdp5_kms->lut_clk)
|
|
||||||
clk_disable_unprepare(mdp5_kms->lut_clk);
|
clk_disable_unprepare(mdp5_kms->lut_clk);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -317,11 +314,8 @@ static int mdp5_enable(struct mdp5_kms *mdp5_kms)
|
||||||
clk_prepare_enable(mdp5_kms->ahb_clk);
|
clk_prepare_enable(mdp5_kms->ahb_clk);
|
||||||
clk_prepare_enable(mdp5_kms->axi_clk);
|
clk_prepare_enable(mdp5_kms->axi_clk);
|
||||||
clk_prepare_enable(mdp5_kms->core_clk);
|
clk_prepare_enable(mdp5_kms->core_clk);
|
||||||
if (mdp5_kms->lut_clk)
|
|
||||||
clk_prepare_enable(mdp5_kms->lut_clk);
|
clk_prepare_enable(mdp5_kms->lut_clk);
|
||||||
if (mdp5_kms->tbu_clk)
|
|
||||||
clk_prepare_enable(mdp5_kms->tbu_clk);
|
clk_prepare_enable(mdp5_kms->tbu_clk);
|
||||||
if (mdp5_kms->tbu_rt_clk)
|
|
||||||
clk_prepare_enable(mdp5_kms->tbu_rt_clk);
|
clk_prepare_enable(mdp5_kms->tbu_rt_clk);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -136,9 +136,7 @@ static int mdp5_mdss_enable(struct msm_mdss *mdss)
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
clk_prepare_enable(mdp5_mdss->ahb_clk);
|
clk_prepare_enable(mdp5_mdss->ahb_clk);
|
||||||
if (mdp5_mdss->axi_clk)
|
|
||||||
clk_prepare_enable(mdp5_mdss->axi_clk);
|
clk_prepare_enable(mdp5_mdss->axi_clk);
|
||||||
if (mdp5_mdss->vsync_clk)
|
|
||||||
clk_prepare_enable(mdp5_mdss->vsync_clk);
|
clk_prepare_enable(mdp5_mdss->vsync_clk);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -149,9 +147,7 @@ static int mdp5_mdss_disable(struct msm_mdss *mdss)
|
||||||
struct mdp5_mdss *mdp5_mdss = to_mdp5_mdss(mdss);
|
struct mdp5_mdss *mdp5_mdss = to_mdp5_mdss(mdss);
|
||||||
DBG("");
|
DBG("");
|
||||||
|
|
||||||
if (mdp5_mdss->vsync_clk)
|
|
||||||
clk_disable_unprepare(mdp5_mdss->vsync_clk);
|
clk_disable_unprepare(mdp5_mdss->vsync_clk);
|
||||||
if (mdp5_mdss->axi_clk)
|
|
||||||
clk_disable_unprepare(mdp5_mdss->axi_clk);
|
clk_disable_unprepare(mdp5_mdss->axi_clk);
|
||||||
clk_disable_unprepare(mdp5_mdss->ahb_clk);
|
clk_disable_unprepare(mdp5_mdss->ahb_clk);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue