summaryrefslogtreecommitdiffstats
path: root/drivers/base/power
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2017-03-17 11:26:19 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-05-09 10:15:19 +0530
commit401ea1572de944df548a13eded82339491a739ff (patch)
treea261c4df9dbd0bc419ee64d720c904943e1cedcd /drivers/base/power
parente2f4b5f8dc59c28605a320ea923905e519fd2ca7 (diff)
downloadop-kernel-dev-401ea1572de944df548a13eded82339491a739ff.zip
op-kernel-dev-401ea1572de944df548a13eded82339491a739ff.tar.gz
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: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/domain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 1ea0e25..4a3dc9c 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1696,6 +1696,9 @@ int pm_genpd_init(struct generic_pm_domain *genpd,
return ret;
}
+ device_initialize(&genpd->dev);
+ dev_set_name(&genpd->dev, "%s", genpd->name);
+
mutex_lock(&gpd_list_lock);
list_add(&genpd->gpd_list_node, &gpd_list);
mutex_unlock(&gpd_list_lock);
OpenPOWER on IntegriCloud