Skip to content

Commit

Permalink
PM / Domains: Don't check for an existing device when adding a new
Browse files Browse the repository at this point in the history
When adding a device to a genpd, we no longer need to walk genpd's list
of existing devices to verify it hasn't already been added.

Instead we can now rely on the verification of not allowing existing
generic_pm_domain_data for a device, since that has the same meaning.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Ulf Hansson authored and Rafael J. Wysocki committed Feb 3, 2015
1 parent 14b5306 commit e07b45c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
struct gpd_timing_data *td)
{
struct generic_pm_domain_data *gpd_data_new, *gpd_data = NULL;
struct pm_domain_data *pdd;
int ret = 0;

dev_dbg(dev, "%s()\n", __func__);
Expand All @@ -1434,12 +1433,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
goto out;
}

list_for_each_entry(pdd, &genpd->dev_list, list_node)
if (pdd->dev == dev) {
ret = -EINVAL;
goto out;
}

ret = dev_pm_get_subsys_data(dev);
if (ret)
goto out;
Expand Down

0 comments on commit e07b45c

Please sign in to comment.