cpufreq.c (15171769069408789a72f9aa9a52cc931b839b56) | cpufreq.c (1f39fa0dccff71d4788089b5e617229b19166867) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/drivers/cpufreq/cpufreq.c 4 * 5 * Copyright (C) 2001 Russell King 6 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> 7 * (C) 2013 Viresh Kumar <viresh.kumar@linaro.org> 8 * --- 2246 unchanged lines hidden (view full) --- 2255 * after finding index. But it is left intentionally for cases where 2256 * exactly same freq is called again and so we can save on few function 2257 * calls. 2258 */ 2259 if (target_freq == policy->cur && 2260 !(cpufreq_driver->flags & CPUFREQ_NEED_UPDATE_LIMITS)) 2261 return 0; 2262 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/drivers/cpufreq/cpufreq.c 4 * 5 * Copyright (C) 2001 Russell King 6 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de> 7 * (C) 2013 Viresh Kumar <viresh.kumar@linaro.org> 8 * --- 2246 unchanged lines hidden (view full) --- 2255 * after finding index. But it is left intentionally for cases where 2256 * exactly same freq is called again and so we can save on few function 2257 * calls. 2258 */ 2259 if (target_freq == policy->cur && 2260 !(cpufreq_driver->flags & CPUFREQ_NEED_UPDATE_LIMITS)) 2261 return 0; 2262 |
2263 if (cpufreq_driver->target) | 2263 if (cpufreq_driver->target) { 2264 /* 2265 * If the driver hasn't setup a single inefficient frequency, 2266 * it's unlikely it knows how to decode CPUFREQ_RELATION_E. 2267 */ 2268 if (!policy->efficiencies_available) 2269 relation &= ~CPUFREQ_RELATION_E; 2270 |
2264 return cpufreq_driver->target(policy, target_freq, relation); | 2271 return cpufreq_driver->target(policy, target_freq, relation); |
2272 } |
|
2265 2266 if (!cpufreq_driver->target_index) 2267 return -EINVAL; 2268 2269 return __target_index(policy, policy->cached_resolved_idx); 2270} 2271EXPORT_SYMBOL_GPL(__cpufreq_driver_target); 2272 --- 643 unchanged lines hidden --- | 2273 2274 if (!cpufreq_driver->target_index) 2275 return -EINVAL; 2276 2277 return __target_index(policy, policy->cached_resolved_idx); 2278} 2279EXPORT_SYMBOL_GPL(__cpufreq_driver_target); 2280 --- 643 unchanged lines hidden --- |