Skip to content

Commit e07b45c

Browse files
storulfrafaeljw
authored andcommitted
PM / Domains: Don't check for an existing device when adding a new
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>
1 parent 14b5306 commit e07b45c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/base/power/domain.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,7 +1415,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
14151415
struct gpd_timing_data *td)
14161416
{
14171417
struct generic_pm_domain_data *gpd_data_new, *gpd_data = NULL;
1418-
struct pm_domain_data *pdd;
14191418
int ret = 0;
14201419

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

1437-
list_for_each_entry(pdd, &genpd->dev_list, list_node)
1438-
if (pdd->dev == dev) {
1439-
ret = -EINVAL;
1440-
goto out;
1441-
}
1442-
14431436
ret = dev_pm_get_subsys_data(dev);
14441437
if (ret)
14451438
goto out;

0 commit comments

Comments
 (0)