summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq-cpu0.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2013-09-19 17:03:50 -0400
committerRafael J. Wysocki <rjw@rjwysocki.net>2013-10-25 16:33:23 -0400
commit5d4879cda67b09f086807821cf594ee079d6dfbe (patch)
tree58532256e9bff42902510175e7cb7c727a89280b /drivers/cpufreq/cpufreq-cpu0.c
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
PM / OPP: rename functions to dev_pm_opp*
Since Operating Performance Points (OPP) functions are specific to device specific power management, be specific and rename opp_* accessors in OPP library with dev_pm_opp_* equivalent. Affected functions are: opp_get_voltage opp_get_freq opp_get_opp_count opp_find_freq_exact opp_find_freq_floor opp_find_freq_ceil opp_add opp_enable opp_disable opp_get_notifier opp_init_cpufreq_table opp_free_cpufreq_table Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq-cpu0.c')
-rw-r--r--drivers/cpufreq/cpufreq-cpu0.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index c522a95c0e16..af951a9cea78 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -72,7 +72,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
72 72
73 if (!IS_ERR(cpu_reg)) { 73 if (!IS_ERR(cpu_reg)) {
74 rcu_read_lock(); 74 rcu_read_lock();
75 opp = opp_find_freq_ceil(cpu_dev, &freq_Hz); 75 opp = dev_pm_opp_find_freq_ceil(cpu_dev, &freq_Hz);
76 if (IS_ERR(opp)) { 76 if (IS_ERR(opp)) {
77 rcu_read_unlock(); 77 rcu_read_unlock();
78 pr_err("failed to find OPP for %ld\n", freq_Hz); 78 pr_err("failed to find OPP for %ld\n", freq_Hz);
@@ -80,7 +80,7 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
80 ret = PTR_ERR(opp); 80 ret = PTR_ERR(opp);
81 goto post_notify; 81 goto post_notify;
82 } 82 }
83 volt = opp_get_voltage(opp); 83 volt = dev_pm_opp_get_voltage(opp);
84 rcu_read_unlock(); 84 rcu_read_unlock();
85 tol = volt * voltage_tolerance / 100; 85 tol = volt * voltage_tolerance / 100;
86 volt_old = regulator_get_voltage(cpu_reg); 86 volt_old = regulator_get_voltage(cpu_reg);
@@ -218,7 +218,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
218 goto out_put_node; 218 goto out_put_node;
219 } 219 }
220 220
221 ret = opp_init_cpufreq_table(cpu_dev, &freq_table); 221 ret = dev_pm_opp_init_cpufreq_table(cpu_dev, &freq_table);
222 if (ret) { 222 if (ret) {
223 pr_err("failed to init cpufreq table: %d\n", ret); 223 pr_err("failed to init cpufreq table: %d\n", ret);
224 goto out_put_node; 224 goto out_put_node;
@@ -242,12 +242,12 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
242 for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) 242 for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++)
243 ; 243 ;
244 rcu_read_lock(); 244 rcu_read_lock();
245 opp = opp_find_freq_exact(cpu_dev, 245 opp = dev_pm_opp_find_freq_exact(cpu_dev,
246 freq_table[0].frequency * 1000, true); 246 freq_table[0].frequency * 1000, true);
247 min_uV = opp_get_voltage(opp); 247 min_uV = dev_pm_opp_get_voltage(opp);
248 opp = opp_find_freq_exact(cpu_dev, 248 opp = dev_pm_opp_find_freq_exact(cpu_dev,
249 freq_table[i-1].frequency * 1000, true); 249 freq_table[i-1].frequency * 1000, true);
250 max_uV = opp_get_voltage(opp); 250 max_uV = dev_pm_opp_get_voltage(opp);
251 rcu_read_unlock(); 251 rcu_read_unlock();
252 ret = regulator_set_voltage_time(cpu_reg, min_uV, max_uV); 252 ret = regulator_set_voltage_time(cpu_reg, min_uV, max_uV);
253 if (ret > 0) 253 if (ret > 0)
@@ -264,7 +264,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
264 return 0; 264 return 0;
265 265
266out_free_table: 266out_free_table:
267 opp_free_cpufreq_table(cpu_dev, &freq_table); 267 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
268out_put_node: 268out_put_node:
269 of_node_put(np); 269 of_node_put(np);
270 return ret; 270 return ret;
@@ -273,7 +273,7 @@ out_put_node:
273static int cpu0_cpufreq_remove(struct platform_device *pdev) 273static int cpu0_cpufreq_remove(struct platform_device *pdev)
274{ 274{
275 cpufreq_unregister_driver(&cpu0_cpufreq_driver); 275 cpufreq_unregister_driver(&cpu0_cpufreq_driver);
276 opp_free_cpufreq_table(cpu_dev, &freq_table); 276 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
277 277
278 return 0; 278 return 0;
279} 279}