diff options
author | Leonard Crestez <leonard.crestez@nxp.com> | 2019-10-31 22:34:19 +0100 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2019-12-09 04:19:15 +0100 |
commit | e7cc792d00049c874010b398a27c3cc7bc8fef34 (patch) | |
tree | 4849c6d5da6cb21115a5e24c0bddfa218e40537a /drivers/devfreq | |
parent | PM / devfreq: Fix devfreq_notifier_call returning errno (diff) | |
download | linux-e7cc792d00049c874010b398a27c3cc7bc8fef34.tar.xz linux-e7cc792d00049c874010b398a27c3cc7bc8fef34.zip |
PM / devfreq: Set scaling_max_freq to max on OPP notifier error
The devfreq_notifier_call functions will update scaling_min_freq and
scaling_max_freq when the OPP table is updated.
If fetching the maximum frequency fails then scaling_max_freq remains
set to zero which is confusing. Set to ULONG_MAX instead so we don't
need special handling for this case in other places.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r-- | drivers/devfreq/devfreq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 4de70bd0f63d..66f0a795442b 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -577,8 +577,10 @@ static int devfreq_notifier_call(struct notifier_block *nb, unsigned long type, goto out; devfreq->scaling_max_freq = find_available_max_freq(devfreq); - if (!devfreq->scaling_max_freq) + if (!devfreq->scaling_max_freq) { + devfreq->scaling_max_freq = ULONG_MAX; goto out; + } err = update_devfreq(devfreq); |