diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-03-14 05:53:08 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-03-14 05:53:08 -0400 |
commit | 75f3e2395430ad6416a7d35e892db7ff60e012e1 (patch) | |
tree | 2ebcbc5e680e98df393696341e36926ff365b585 | |
parent | 4650b2792944e4cee86df6b016f2b7338a0b33f1 (diff) | |
parent | d9dfca7f81246db9a2c28ac1c811fc1085fbd478 (diff) |
Merge branch 'pm-domains'
* pm-domains:
PM / domains: Remove one unnecessary blank line
PM / Domains: Return early for all errors in _genpd_power_off()
PM / Domains: Improve warn for multiple states but no governor
-rw-r--r-- | drivers/base/power/domain.c | 8 | ||||
-rw-r--r-- | drivers/base/power/domain_governor.c | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 764e0f28979e..76c9969b7124 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -459,19 +459,19 @@ static int _genpd_power_off(struct generic_pm_domain *genpd, bool timed) | |||
459 | 459 | ||
460 | time_start = ktime_get(); | 460 | time_start = ktime_get(); |
461 | ret = genpd->power_off(genpd); | 461 | ret = genpd->power_off(genpd); |
462 | if (ret == -EBUSY) | 462 | if (ret) |
463 | return ret; | 463 | return ret; |
464 | 464 | ||
465 | elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)); | 465 | elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start)); |
466 | if (elapsed_ns <= genpd->states[state_idx].power_off_latency_ns) | 466 | if (elapsed_ns <= genpd->states[state_idx].power_off_latency_ns) |
467 | return ret; | 467 | return 0; |
468 | 468 | ||
469 | genpd->states[state_idx].power_off_latency_ns = elapsed_ns; | 469 | genpd->states[state_idx].power_off_latency_ns = elapsed_ns; |
470 | genpd->max_off_time_changed = true; | 470 | genpd->max_off_time_changed = true; |
471 | pr_debug("%s: Power-%s latency exceeded, new value %lld ns\n", | 471 | pr_debug("%s: Power-%s latency exceeded, new value %lld ns\n", |
472 | genpd->name, "off", elapsed_ns); | 472 | genpd->name, "off", elapsed_ns); |
473 | 473 | ||
474 | return ret; | 474 | return 0; |
475 | } | 475 | } |
476 | 476 | ||
477 | /** | 477 | /** |
@@ -1768,7 +1768,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd, | |||
1768 | ret = genpd_set_default_power_state(genpd); | 1768 | ret = genpd_set_default_power_state(genpd); |
1769 | if (ret) | 1769 | if (ret) |
1770 | return ret; | 1770 | return ret; |
1771 | } else if (!gov) { | 1771 | } else if (!gov && genpd->state_count > 1) { |
1772 | pr_warn("%s: no governor for states\n", genpd->name); | 1772 | pr_warn("%s: no governor for states\n", genpd->name); |
1773 | } | 1773 | } |
1774 | 1774 | ||
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index 99896fbf18e4..4d07e38a8247 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c | |||
@@ -128,7 +128,6 @@ static bool __default_power_down_ok(struct dev_pm_domain *pd, | |||
128 | off_on_time_ns = genpd->states[state].power_off_latency_ns + | 128 | off_on_time_ns = genpd->states[state].power_off_latency_ns + |
129 | genpd->states[state].power_on_latency_ns; | 129 | genpd->states[state].power_on_latency_ns; |
130 | 130 | ||
131 | |||
132 | min_off_time_ns = -1; | 131 | min_off_time_ns = -1; |
133 | /* | 132 | /* |
134 | * Check if subdomains can be off for enough time. | 133 | * Check if subdomains can be off for enough time. |