summaryrefslogtreecommitdiff
path: root/drivers/base/power
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2015-01-27 21:13:39 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-02-03 22:56:52 +0100
commitc1dbe2fbb33ef425a81e1a7cffd17c113c87cdbc (patch)
tree3ac59c5a952434a78f2e2db51f19d1cc842fe9d2 /drivers/base/power
parent49d400c74a8939ae783e3555459926b281a2b17d (diff)
PM / Domains: Remove reference counting for the generic_pm_domain_data
The reference counting was needed when genpd supported PM domain device callbacks. Since this option has been removed, let's also remove the reference counting of the struct generic_pm_domain_data. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r--drivers/base/power/domain.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index f9e7df554b2f..351df5bbd9c9 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1456,7 +1456,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
gpd_data = gpd_data_new;
dev->power.subsys_data->domain_data = &gpd_data->base;
}
- gpd_data->refcount++;
if (td)
gpd_data->td = *td;
@@ -1504,7 +1503,6 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
{
struct generic_pm_domain_data *gpd_data;
struct pm_domain_data *pdd;
- bool remove = false;
int ret = 0;
dev_dbg(dev, "%s()\n", __func__);
@@ -1533,10 +1531,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
pdd = dev->power.subsys_data->domain_data;
list_del_init(&pdd->list_node);
gpd_data = to_gpd_data(pdd);
- if (--gpd_data->refcount == 0) {
- dev->power.subsys_data->domain_data = NULL;
- remove = true;
- }
+ dev->power.subsys_data->domain_data = NULL;
spin_unlock_irq(&dev->power.lock);
@@ -1547,8 +1542,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
genpd_release_lock(genpd);
dev_pm_put_subsys_data(dev);
- if (remove)
- genpd_free_dev_data(dev, gpd_data);
+ genpd_free_dev_data(dev, gpd_data);
return 0;