Commit c1dbe2fb authored by Ulf Hansson's avatar Ulf Hansson Committed by Rafael J. Wysocki

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 49d400c7
...@@ -1456,7 +1456,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, ...@@ -1456,7 +1456,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
gpd_data = gpd_data_new; gpd_data = gpd_data_new;
dev->power.subsys_data->domain_data = &gpd_data->base; dev->power.subsys_data->domain_data = &gpd_data->base;
} }
gpd_data->refcount++;
if (td) if (td)
gpd_data->td = *td; gpd_data->td = *td;
...@@ -1504,7 +1503,6 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd, ...@@ -1504,7 +1503,6 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
{ {
struct generic_pm_domain_data *gpd_data; struct generic_pm_domain_data *gpd_data;
struct pm_domain_data *pdd; struct pm_domain_data *pdd;
bool remove = false;
int ret = 0; int ret = 0;
dev_dbg(dev, "%s()\n", __func__); dev_dbg(dev, "%s()\n", __func__);
...@@ -1533,10 +1531,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd, ...@@ -1533,10 +1531,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
pdd = dev->power.subsys_data->domain_data; pdd = dev->power.subsys_data->domain_data;
list_del_init(&pdd->list_node); list_del_init(&pdd->list_node);
gpd_data = to_gpd_data(pdd); gpd_data = to_gpd_data(pdd);
if (--gpd_data->refcount == 0) {
dev->power.subsys_data->domain_data = NULL; dev->power.subsys_data->domain_data = NULL;
remove = true;
}
spin_unlock_irq(&dev->power.lock); spin_unlock_irq(&dev->power.lock);
...@@ -1547,7 +1542,6 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd, ...@@ -1547,7 +1542,6 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
genpd_release_lock(genpd); genpd_release_lock(genpd);
dev_pm_put_subsys_data(dev); dev_pm_put_subsys_data(dev);
if (remove)
genpd_free_dev_data(dev, gpd_data); genpd_free_dev_data(dev, gpd_data);
return 0; return 0;
......
...@@ -114,7 +114,6 @@ struct generic_pm_domain_data { ...@@ -114,7 +114,6 @@ struct generic_pm_domain_data {
struct gpd_timing_data td; struct gpd_timing_data td;
struct notifier_block nb; struct notifier_block nb;
struct mutex lock; struct mutex lock;
unsigned int refcount;
int need_restore; int need_restore;
}; };
......
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