clk: renesas: mstp: Postpone call to pm_genpd_init()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 22 Apr 2016 12:45:45 +0000 (14:45 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 28 Apr 2016 08:32:41 +0000 (10:32 +0200)
All local setup of the generic_pm_domain structure should have been
completed before calling pm_genpd_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/clk/renesas/clk-mstp.c

index 8b597b9a380442e8bbbc17086a2c194be848a7f2..969fbb61ab07b9b8f60999e7defed3700c4e74b0 100644 (file)
@@ -316,11 +316,10 @@ void __init cpg_mstp_add_clk_domain(struct device_node *np)
                return;
 
        pd->name = np->name;
-
        pd->flags = GENPD_FLAG_PM_CLK;
-       pm_genpd_init(pd, &simple_qos_governor, false);
        pd->attach_dev = cpg_mstp_attach_dev;
        pd->detach_dev = cpg_mstp_detach_dev;
+       pm_genpd_init(pd, &simple_qos_governor, false);
 
        of_genpd_add_provider_simple(np, pd);
 }