aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-10-02 04:43:16 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-15 18:50:23 -0400
commit037ce8397d23b2f84ccfb879cf4b43277b0454e3 (patch)
treec4fe33e2a95c8edbc25a0586af9f8e122f755f38 /drivers/cpufreq/cpufreq.c
parent77db50c4eb1991d6e88254390ec368e1d23a8fa5 (diff)
cpufreq: rename __cpufreq_set_policy() as cpufreq_set_policy()
Earlier there used to be two functions named __cpufreq_set_policy() and cpufreq_set_policy(), but now we only have a single routine lets name it cpufreq_set_policy() instead of __cpufreq_set_policy(). This also removes some invalid comments or fixes some incorrect comments. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index b04a5d6f13df..3a811df43e14 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -412,7 +412,7 @@ show_one(scaling_min_freq, min);
412show_one(scaling_max_freq, max); 412show_one(scaling_max_freq, max);
413show_one(scaling_cur_freq, cur); 413show_one(scaling_cur_freq, cur);
414 414
415static int __cpufreq_set_policy(struct cpufreq_policy *policy, 415static int cpufreq_set_policy(struct cpufreq_policy *policy,
416 struct cpufreq_policy *new_policy); 416 struct cpufreq_policy *new_policy);
417 417
418/** 418/**
@@ -433,7 +433,7 @@ static ssize_t store_##file_name \
433 if (ret != 1) \ 433 if (ret != 1) \
434 return -EINVAL; \ 434 return -EINVAL; \
435 \ 435 \
436 ret = __cpufreq_set_policy(policy, &new_policy); \ 436 ret = cpufreq_set_policy(policy, &new_policy); \
437 policy->user_policy.object = policy->object; \ 437 policy->user_policy.object = policy->object; \
438 \ 438 \
439 return ret ? ret : count; \ 439 return ret ? ret : count; \
@@ -491,11 +491,7 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
491 &new_policy.governor)) 491 &new_policy.governor))
492 return -EINVAL; 492 return -EINVAL;
493 493
494 /* 494 ret = cpufreq_set_policy(policy, &new_policy);
495 * Do not use cpufreq_set_policy here or the user_policy.max
496 * will be wrongly overridden
497 */
498 ret = __cpufreq_set_policy(policy, &new_policy);
499 495
500 policy->user_policy.policy = policy->policy; 496 policy->user_policy.policy = policy->policy;
501 policy->user_policy.governor = policy->governor; 497 policy->user_policy.governor = policy->governor;
@@ -837,11 +833,11 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy)
837 int ret = 0; 833 int ret = 0;
838 834
839 memcpy(&new_policy, policy, sizeof(*policy)); 835 memcpy(&new_policy, policy, sizeof(*policy));
840 /* assure that the starting sequence is run in __cpufreq_set_policy */ 836 /* assure that the starting sequence is run in cpufreq_set_policy */
841 policy->governor = NULL; 837 policy->governor = NULL;
842 838
843 /* set default policy */ 839 /* set default policy */
844 ret = __cpufreq_set_policy(policy, &new_policy); 840 ret = cpufreq_set_policy(policy, &new_policy);
845 policy->user_policy.policy = policy->policy; 841 policy->user_policy.policy = policy->policy;
846 policy->user_policy.governor = policy->governor; 842 policy->user_policy.governor = policy->governor;
847 843
@@ -1846,10 +1842,10 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu)
1846EXPORT_SYMBOL(cpufreq_get_policy); 1842EXPORT_SYMBOL(cpufreq_get_policy);
1847 1843
1848/* 1844/*
1849 * data : current policy. 1845 * policy : current policy.
1850 * policy : policy to be set. 1846 * new_policy: policy to be set.
1851 */ 1847 */
1852static int __cpufreq_set_policy(struct cpufreq_policy *policy, 1848static int cpufreq_set_policy(struct cpufreq_policy *policy,
1853 struct cpufreq_policy *new_policy) 1849 struct cpufreq_policy *new_policy)
1854{ 1850{
1855 int ret = 0, failed = 1; 1851 int ret = 0, failed = 1;
@@ -1995,7 +1991,7 @@ int cpufreq_update_policy(unsigned int cpu)
1995 } 1991 }
1996 } 1992 }
1997 1993
1998 ret = __cpufreq_set_policy(policy, &new_policy); 1994 ret = cpufreq_set_policy(policy, &new_policy);
1999 1995
2000 unlock_policy_rwsem_write(cpu); 1996 unlock_policy_rwsem_write(cpu);
2001 1997