diff options
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index bd411e754f4a..f103869db443 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -187,19 +187,12 @@ struct genpd_onecell_data { unsigned int num_domains; }; -typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args, - void *data); - #ifdef CONFIG_PM_GENERIC_DOMAINS_OF -int __of_genpd_add_provider(struct device_node *np, genpd_xlate_t xlate, - void *data); +int of_genpd_add_provider_simple(struct device_node *np, + struct generic_pm_domain *genpd); +int of_genpd_add_provider_onecell(struct device_node *np, + struct genpd_onecell_data *data); void of_genpd_del_provider(struct device_node *np); -struct generic_pm_domain *__of_genpd_xlate_simple( - struct of_phandle_args *genpdspec, - void *data); -struct generic_pm_domain *__of_genpd_xlate_onecell( - struct of_phandle_args *genpdspec, - void *data); extern int of_genpd_add_device(struct of_phandle_args *args, struct device *dev); extern int of_genpd_add_subdomain(struct of_phandle_args *parent, @@ -207,15 +200,19 @@ extern int of_genpd_add_subdomain(struct of_phandle_args *parent, int genpd_dev_pm_attach(struct device *dev); #else /* !CONFIG_PM_GENERIC_DOMAINS_OF */ -static inline int __of_genpd_add_provider(struct device_node *np, - genpd_xlate_t xlate, void *data) +static inline int of_genpd_add_provider_simple(struct device_node *np, + struct generic_pm_domain *genpd) { - return 0; + return -ENOTSUPP; +} + +static inline int of_genpd_add_provider_onecell(struct device_node *np, + struct genpd_onecell_data *data) +{ + return -ENOTSUPP; } -static inline void of_genpd_del_provider(struct device_node *np) {} -#define __of_genpd_xlate_simple NULL -#define __of_genpd_xlate_onecell NULL +static inline void of_genpd_del_provider(struct device_node *np) {} static inline int of_genpd_add_device(struct of_phandle_args *args, struct device *dev) @@ -235,17 +232,6 @@ static inline int genpd_dev_pm_attach(struct device *dev) } #endif /* CONFIG_PM_GENERIC_DOMAINS_OF */ -static inline int of_genpd_add_provider_simple(struct device_node *np, - struct generic_pm_domain *genpd) -{ - return __of_genpd_add_provider(np, __of_genpd_xlate_simple, genpd); -} -static inline int of_genpd_add_provider_onecell(struct device_node *np, - struct genpd_onecell_data *data) -{ - return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data); -} - #ifdef CONFIG_PM extern int dev_pm_domain_attach(struct device *dev, bool power_on); extern void dev_pm_domain_detach(struct device *dev, bool power_off); |