summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-08 08:20:32 -0500
committerTakashi Iwai <tiwai@suse.de>2019-02-08 08:20:32 -0500
commitd02cac152c97dffcb0cdd91e09b54fd6e2cca63d (patch)
tree68e4c6bd842703009f3edbf8f0e0e9326e4b2fad /drivers/cpufreq/cpufreq.c
parent36e4617c01153757cde9e5fcd375a75a8f8425c3 (diff)
parenta50e32694fbcdbf55875095258b9398e2eabd71f (diff)
Merge tag 'asoc-v5.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v5.1 Lots and lots of new drivers so far, a highlight being the MediaTek BTCVSD which is a driver for a Bluetooth radio chip - the first such driver we've had upstream. Hopefully we will soon also see a baseband with an upstream driver! - Support for only powering up channels that are actively being used. - Quite a few improvements to simplify the generic card drivers, especially the merge of the SCU cards into the main generic drivers. - Lots of fixes for probing on Intel systems, trying to rationalize things to look more standard from a framework point of view. - New drivers for Asahi Kasei Microdevices AK4497, Cirrus Logic CS4341, Google ChromeOS embedded controllers, Ingenic JZ4725B, MediaTek BTCVSD, MT8183 and MT6358, NXP MICFIL, Rockchip RK3328, Spreadtrum DMA controllers, Qualcomm WCD9335, Xilinx S/PDIF and PCM formatters.
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6f23ebb395f1..e35a886e00bc 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1530,17 +1530,16 @@ static unsigned int __cpufreq_get(struct cpufreq_policy *policy)
1530{ 1530{
1531 unsigned int ret_freq = 0; 1531 unsigned int ret_freq = 0;
1532 1532
1533 if (!cpufreq_driver->get) 1533 if (unlikely(policy_is_inactive(policy)) || !cpufreq_driver->get)
1534 return ret_freq; 1534 return ret_freq;
1535 1535
1536 ret_freq = cpufreq_driver->get(policy->cpu); 1536 ret_freq = cpufreq_driver->get(policy->cpu);
1537 1537
1538 /* 1538 /*
1539 * Updating inactive policies is invalid, so avoid doing that. Also 1539 * If fast frequency switching is used with the given policy, the check
1540 * if fast frequency switching is used with the given policy, the check
1541 * against policy->cur is pointless, so skip it in that case too. 1540 * against policy->cur is pointless, so skip it in that case too.
1542 */ 1541 */
1543 if (unlikely(policy_is_inactive(policy)) || policy->fast_switch_enabled) 1542 if (policy->fast_switch_enabled)
1544 return ret_freq; 1543 return ret_freq;
1545 1544
1546 if (ret_freq && policy->cur && 1545 if (ret_freq && policy->cur &&
@@ -1569,10 +1568,7 @@ unsigned int cpufreq_get(unsigned int cpu)
1569 1568
1570 if (policy) { 1569 if (policy) {
1571 down_read(&policy->rwsem); 1570 down_read(&policy->rwsem);
1572 1571 ret_freq = __cpufreq_get(policy);
1573 if (!policy_is_inactive(policy))
1574 ret_freq = __cpufreq_get(policy);
1575
1576 up_read(&policy->rwsem); 1572 up_read(&policy->rwsem);
1577 1573
1578 cpufreq_cpu_put(policy); 1574 cpufreq_cpu_put(policy);