diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-04-26 10:53:02 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-05-14 22:58:44 +0200 |
commit | b56d9c9135629632faff44cff153784e76b82550 (patch) | |
tree | 220993b7497144ed6a0e849826780932206b87a6 /drivers/base/power | |
parent | ed37884584c4b1ee28bb076c756cd6bd29784c7e (diff) | |
download | linux-b56d9c9135629632faff44cff153784e76b82550.tar.gz linux-b56d9c9135629632faff44cff153784e76b82550.tar.bz2 linux-b56d9c9135629632faff44cff153784e76b82550.zip |
PM / Domains: Drop redundant code in genpd while attaching devices
The driver core together with the PM core, nowadays deals with deferring
all probes during the device system sleep phases. Therefore genpd no longer
need to care about this situation, so let's drop the corresponding code.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/domain.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index d3703a149cb5..d4b96edb027d 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1377,7 +1377,7 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, struct gpd_timing_data *td) { struct generic_pm_domain_data *gpd_data; - int ret = 0; + int ret; dev_dbg(dev, "%s()\n", __func__); @@ -1390,11 +1390,6 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, genpd_lock(genpd); - if (genpd->prepared_count > 0) { - ret = -EAGAIN; - goto out; - } - ret = genpd->attach_dev ? genpd->attach_dev(genpd, dev) : 0; if (ret) goto out; @@ -2194,7 +2189,6 @@ int genpd_dev_pm_attach(struct device *dev) { struct of_phandle_args pd_args; struct generic_pm_domain *pd; - unsigned int i; int ret; if (!dev->of_node) @@ -2220,14 +2214,7 @@ int genpd_dev_pm_attach(struct device *dev) dev_dbg(dev, "adding to PM domain %s\n", pd->name); - for (i = 1; i < GENPD_RETRY_MAX_MS; i <<= 1) { - ret = genpd_add_device(pd, dev, NULL); - if (ret != -EAGAIN) - break; - - mdelay(i); - cond_resched(); - } + ret = genpd_add_device(pd, dev, NULL); mutex_unlock(&gpd_list_lock); if (ret < 0) { |