ARM: shmobile: pm-rmobile: Postpone call to pm_genpd_init()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 4 May 2016 08:27:46 +0000 (10:27 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 30 May 2016 00:39:42 +0000 (09:39 +0900)
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: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/pm-rmobile.c

index c0b05e9e644207ddb4bf65993e804f6e121fd297..45a195501b785d5b08cc2bf8eea50840062c9c0d 100644 (file)
@@ -131,13 +131,13 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
        struct dev_power_governor *gov = rmobile_pd->gov;
 
        genpd->flags = GENPD_FLAG_PM_CLK;
-       pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
        genpd->dev_ops.active_wakeup    = rmobile_pd_active_wakeup;
        genpd->power_off                = rmobile_pd_power_down;
        genpd->power_on                 = rmobile_pd_power_up;
        genpd->attach_dev               = cpg_mstp_attach_dev;
        genpd->detach_dev               = cpg_mstp_detach_dev;
        __rmobile_pd_power_up(rmobile_pd, false);
+       pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
 }
 
 static int rmobile_pd_suspend_busy(void)