summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-08-28 00:53:49 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-08-28 00:53:49 +0200
commitb98f602df71aa9612af3239a8d2a23b126e4357a (patch)
treedb2fa2b95e4b4ef17f9ca76ae2469340a7c28aae /drivers
parentMerge tag 'acpi-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/raf... (diff)
parentcpufreq: check only freq_table in __resolve_freq() (diff)
downloadlinux-b98f602df71aa9612af3239a8d2a23b126e4357a.tar.xz
linux-b98f602df71aa9612af3239a8d2a23b126e4357a.zip
Merge tag 'pm-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki: "Make __resolve_freq() check the presence of the frequency table instead of checking whether or not the ->target_index() callback is implemented by the driver, because that need not be the case when __resolve_freq() is used (Lukasz Luba)" * tag 'pm-6.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: check only freq_table in __resolve_freq()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 7820c4e74289..69b3d61852ac 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -532,7 +532,7 @@ static unsigned int __resolve_freq(struct cpufreq_policy *policy,
target_freq = clamp_val(target_freq, policy->min, policy->max);
- if (!cpufreq_driver->target_index)
+ if (!policy->freq_table)
return target_freq;
idx = cpufreq_frequency_table_target(policy, target_freq, relation);