cpufreq.c (b23aa311fa1f376640069e5da897b4a6148d104f) cpufreq.c (4db7c34cb41a3d7ed7db7a84413d7c225278c36a)
1/*
2 * linux/drivers/cpufreq/cpufreq.c
3 *
4 * Copyright (C) 2001 Russell King
5 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
6 * (C) 2013 Viresh Kumar <viresh.kumar@linaro.org>
7 *
8 * Oct 2005 - Ashok Raj <ashok.raj@intel.com>

--- 1571 unchanged lines hidden (view full) ---

1580 return ret_freq;
1581}
1582EXPORT_SYMBOL(cpufreq_quick_get_max);
1583
1584static unsigned int __cpufreq_get(struct cpufreq_policy *policy)
1585{
1586 unsigned int ret_freq = 0;
1587
1/*
2 * linux/drivers/cpufreq/cpufreq.c
3 *
4 * Copyright (C) 2001 Russell King
5 * (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
6 * (C) 2013 Viresh Kumar <viresh.kumar@linaro.org>
7 *
8 * Oct 2005 - Ashok Raj <ashok.raj@intel.com>

--- 1571 unchanged lines hidden (view full) ---

1580 return ret_freq;
1581}
1582EXPORT_SYMBOL(cpufreq_quick_get_max);
1583
1584static unsigned int __cpufreq_get(struct cpufreq_policy *policy)
1585{
1586 unsigned int ret_freq = 0;
1587
1588 if (unlikely(policy_is_inactive(policy)) || !cpufreq_driver->get)
1588 if (unlikely(policy_is_inactive(policy)))
1589 return ret_freq;
1590
1591 ret_freq = cpufreq_driver->get(policy->cpu);
1592
1593 /*
1594 * If fast frequency switching is used with the given policy, the check
1595 * against policy->cur is pointless, so skip it in that case too.
1596 */

--- 21 unchanged lines hidden (view full) ---

1618 */
1619unsigned int cpufreq_get(unsigned int cpu)
1620{
1621 struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
1622 unsigned int ret_freq = 0;
1623
1624 if (policy) {
1625 down_read(&policy->rwsem);
1589 return ret_freq;
1590
1591 ret_freq = cpufreq_driver->get(policy->cpu);
1592
1593 /*
1594 * If fast frequency switching is used with the given policy, the check
1595 * against policy->cur is pointless, so skip it in that case too.
1596 */

--- 21 unchanged lines hidden (view full) ---

1618 */
1619unsigned int cpufreq_get(unsigned int cpu)
1620{
1621 struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
1622 unsigned int ret_freq = 0;
1623
1624 if (policy) {
1625 down_read(&policy->rwsem);
1626 ret_freq = __cpufreq_get(policy);
1626 if (cpufreq_driver->get)
1627 ret_freq = __cpufreq_get(policy);
1627 up_read(&policy->rwsem);
1628
1629 cpufreq_cpu_put(policy);
1630 }
1631
1632 return ret_freq;
1633}
1634EXPORT_SYMBOL(cpufreq_get);

--- 1047 unchanged lines hidden ---
1628 up_read(&policy->rwsem);
1629
1630 cpufreq_cpu_put(policy);
1631 }
1632
1633 return ret_freq;
1634}
1635EXPORT_SYMBOL(cpufreq_get);

--- 1047 unchanged lines hidden ---