arm: tegra: add api to remove device from domain
Prashant Gaikwad [Tue, 9 Jul 2013 09:40:15 +0000 (14:40 +0530)]
Change-Id: Idfd4b1f91e714dc0368c75214020667a542234ec
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/246612
(cherry picked from commit 76fb4be18abdc47c24952985b8293a52d03e1aab)
Reviewed-on: http://git-master/r/252269
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/include/mach/pm_domains.h
arch/arm/mach-tegra/pm_domains.c

index 77a64cf..5cc31e4 100644 (file)
@@ -32,9 +32,11 @@ struct tegra_pm_domain {
 
 #ifdef CONFIG_TEGRA_MC_DOMAINS
 void tegra_pd_add_device(struct device *dev);
+void tegra_pd_remove_device(struct device *dev);
 void tegra_pd_add_sd(struct generic_pm_domain *sd);
 #else
 #define tegra_pd_add_device(dev) do { } while (0)
+#define tegra_pd_remove_device(dev) do { } while (0)
 #define tegra_pd_add_sd(sd) do { } while (0)
 #endif /* CONFIG_TEGRA_MC_DOMAINS */
 
index 53ec568..e5fcada 100644 (file)
@@ -280,6 +280,15 @@ void tegra_pd_add_device(struct device *dev)
 }
 EXPORT_SYMBOL(tegra_pd_add_device);
 
+void tegra_pd_remove_device(struct device *dev)
+{
+       struct generic_pm_domain *genpd = dev_to_genpd(dev);
+
+       if (!IS_ERR_OR_NULL(genpd))
+               pm_genpd_remove_device(genpd, dev);
+}
+EXPORT_SYMBOL(tegra_pd_remove_device);
+
 void tegra_pd_add_sd(struct generic_pm_domain *sd)
 {
        struct generic_pm_domain *master = tegra_pd_get_domain(sd->name);