Commit 401ea157 authored by Viresh Kumar's avatar Viresh Kumar

PM / Domain: Add struct device to genpd

The power-domain core would be using the OPP core going forward and the
OPP core has the basic requirement of a device structure for its working.

Add a struct device to the genpd structure. This doesn't register the
device with device core as the "dev" pointer is mostly used by the OPP
core as a cookie for now and registering the device is not mandatory.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent e2f4b5f8
...@@ -1696,6 +1696,9 @@ int pm_genpd_init(struct generic_pm_domain *genpd, ...@@ -1696,6 +1696,9 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
return ret; return ret;
} }
device_initialize(&genpd->dev);
dev_set_name(&genpd->dev, "%s", genpd->name);
mutex_lock(&gpd_list_lock); mutex_lock(&gpd_list_lock);
list_add(&genpd->gpd_list_node, &gpd_list); list_add(&genpd->gpd_list_node, &gpd_list);
mutex_unlock(&gpd_list_lock); mutex_unlock(&gpd_list_lock);
......
...@@ -49,6 +49,7 @@ struct genpd_power_state { ...@@ -49,6 +49,7 @@ struct genpd_power_state {
struct genpd_lock_ops; struct genpd_lock_ops;
struct generic_pm_domain { struct generic_pm_domain {
struct device dev;
struct dev_pm_domain domain; /* PM domain operations */ struct dev_pm_domain domain; /* PM domain operations */
struct list_head gpd_list_node; /* Node in the global PM domains list */ struct list_head gpd_list_node; /* Node in the global PM domains list */
struct list_head master_links; /* Links with PM domain as a master */ struct list_head master_links; /* Links with PM domain as a master */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment