Move is_mdp5 check to a more logical place, to the msm_mdss_init(), rather than getting it in the mdss_probe() and passing it then as an argument. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> --- drivers/gpu/drm/msm/msm_mdss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index d81d8fe3584e..ce8ff5bfe55a 100644 --- a/drivers/gpu/drm/msm/msm_mdss.c +++ b/drivers/gpu/drm/msm/msm_mdss.c @@ -329,8 +329,9 @@ static int mdp5_mdss_parse_clock(struct platform_device *pdev, struct clk_bulk_d return num_clocks; } -static struct msm_mdss *msm_mdss_init(struct platform_device *pdev, bool is_mdp5) +static struct msm_mdss *msm_mdss_init(struct platform_device *pdev) { + bool is_mdp5 = of_device_is_compatible(pdev->dev.of_node, "qcom,mdss"); struct msm_mdss *msm_mdss; int ret; int irq; @@ -420,11 +421,10 @@ static const struct dev_pm_ops mdss_pm_ops = { static int mdss_probe(struct platform_device *pdev) { struct msm_mdss *mdss; - bool is_mdp5 = of_device_is_compatible(pdev->dev.of_node, "qcom,mdss"); struct device *dev = &pdev->dev; int ret; - mdss = msm_mdss_init(pdev, is_mdp5); + mdss = msm_mdss_init(pdev); if (IS_ERR(mdss)) return PTR_ERR(mdss); -- 2.35.1