clk: renesas: cpg-mssr: Postpone call to pm_genpd_init()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 22 Apr 2016 12:46:51 +0000 (14:46 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 28 Apr 2016 08:32:53 +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/renesas-cpg-mssr.c

index 1f2dc3629f0e02a037318b9b53fd3fc01af2c2d6..0d595311c659a741d5c1e0fa518ceed61d6e1ee5 100644 (file)
@@ -493,9 +493,9 @@ static int __init cpg_mssr_add_clk_domain(struct device *dev,
        genpd = &pd->genpd;
        genpd->name = np->name;
        genpd->flags = GENPD_FLAG_PM_CLK;
-       pm_genpd_init(genpd, &simple_qos_governor, false);
        genpd->attach_dev = cpg_mssr_attach_dev;
        genpd->detach_dev = cpg_mssr_detach_dev;
+       pm_genpd_init(genpd, &simple_qos_governor, false);
        cpg_mssr_clk_domain = pd;
 
        of_genpd_add_provider_simple(np, genpd);