ARM: shmobile: Use domain names when adding subdomains to power domains
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 6 Aug 2012 23:09:31 +0000 (01:09 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 3 Sep 2012 23:44:56 +0000 (01:44 +0200)
Make the power management code under arch/arm/mach-shmobile/
use pm_genpd_add_subdomain_names() for adding subdomains to power
domains, which makes it possible to drop
rmobile_pm_add_subdomain() and will allow us to carry out those
operations for domain objects stored in tables in a straightforward
way.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
arch/arm/mach-shmobile/include/mach/pm-rmobile.h
arch/arm/mach-shmobile/pm-rmobile.c
arch/arm/mach-shmobile/setup-r8a7740.c
arch/arm/mach-shmobile/setup-sh7372.c

index 0c25fc9826864dda2f9757d366b6f7cc02ea9636..7e2487790122ca6fecaf1bc40666ec1196940fd3 100644 (file)
@@ -33,12 +33,9 @@ struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)
 extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd);
 extern void rmobile_add_device_to_domain(const char *domain_name,
                                        struct platform_device *pdev);
-extern void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd,
-                                   struct rmobile_pm_domain *rmobile_sd);
 #else
 #define rmobile_init_pm_domain(pd) do { } while (0)
 #define rmobile_add_device_to_domain(name, pdev) do { } while (0)
-#define rmobile_pm_add_subdomain(pd, sd) do { } while (0)
 #endif /* CONFIG_PM */
 
 #endif /* PM_RMOBILE_H */
index c94056d6a029c7f152966db271b369616db6fa92..6c47843c511b9d896b0b8ea1463d3e2dfa83597a 100644 (file)
@@ -158,10 +158,4 @@ void rmobile_add_device_to_domain(const char *domain_name,
        if (pm_clk_no_clocks(dev))
                pm_clk_add(dev, NULL);
 }
-
-void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd,
-                            struct rmobile_pm_domain *rmobile_sd)
-{
-       pm_genpd_add_subdomain(&rmobile_pd->genpd, &rmobile_sd->genpd);
-}
 #endif /* CONFIG_PM */
index db7af56855403fac9cda833886ed4fc3667b8873..a18892d4d98572e5d555008e3bbd31c45fccd8d4 100644 (file)
@@ -678,7 +678,7 @@ void __init r8a7740_add_standard_devices(void)
        rmobile_init_pm_domain(&r8a7740_pd_a3sp);
        rmobile_init_pm_domain(&r8a7740_pd_a4lc);
 
-       rmobile_pm_add_subdomain(&r8a7740_pd_a4s, &r8a7740_pd_a3sp);
+       pm_genpd_add_subdomain_names("A4S", "A3SP");
 
        /* add devices */
        platform_add_devices(r8a7740_early_devices,
index 95f06c8fb855ae70195e2b4326f23152a2b556e8..a2e1eeafd1a1d4f39fb94fee47067612ccc71f5d 100644 (file)
@@ -1011,11 +1011,11 @@ void __init sh7372_add_standard_devices(void)
        rmobile_init_pm_domain(&sh7372_pd_a3sp);
        rmobile_init_pm_domain(&sh7372_pd_a3sg);
 
-       rmobile_pm_add_subdomain(&sh7372_pd_a4lc, &sh7372_pd_a3rv);
-       rmobile_pm_add_subdomain(&sh7372_pd_a4r, &sh7372_pd_a4lc);
+       pm_genpd_add_subdomain_names("A4LC", "A3RV");
+       pm_genpd_add_subdomain_names("A4R", "A4LC");
 
-       rmobile_pm_add_subdomain(&sh7372_pd_a4s, &sh7372_pd_a3sg);
-       rmobile_pm_add_subdomain(&sh7372_pd_a4s, &sh7372_pd_a3sp);
+       pm_genpd_add_subdomain_names("A4S", "A3SG");
+       pm_genpd_add_subdomain_names("A4S", "A3SP");
 
        platform_add_devices(sh7372_early_devices,
                            ARRAY_SIZE(sh7372_early_devices));