@@ -53,7 +53,7 @@
static LIST_HEAD(gpd_list);
static DEFINE_MUTEX(gpd_list_lock);
-static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
+struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
{
struct generic_pm_domain *genpd = NULL, *gpd;
@@ -129,7 +129,7 @@ static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
}
extern struct dev_power_governor simple_qos_governor;
-
+extern struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name);
extern struct generic_pm_domain *dev_to_genpd(struct device *dev);
extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
struct device *dev,
@@ -181,6 +181,10 @@ static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
{
return ERR_PTR(-ENOSYS);
}
+static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
+{
+ return ERR_PTR(-ENOSYS);
+}
static inline struct generic_pm_domain *dev_to_genpd(struct device *dev)
{
return ERR_PTR(-ENOSYS);
Make the function pm_genpd_lookup_name(..) non static. This is done to limit the need for "name functions" as e.g. pm_genpd_name_attach_cpuidle. Also the name lookup takes a mutex and should not be called when IRQ's are off. So by exporting this function the name lookup can be done before IRQ's are off. Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> --- drivers/base/power/domain.c | 2 +- include/linux/pm_domain.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-)