aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/exynos-cpufreq.c
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2014-04-17 22:20:33 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-30 19:00:39 -0400
commite5eaa445b0dc90d99eab6239841a982e5df2682f (patch)
tree0ec7d4de989548225dcc2185091d1e7ecd7ae339 /drivers/cpufreq/exynos-cpufreq.c
parent89d4f82aa5ccf08dc28dc8b463844e6d7eed591b (diff)
cpufreq: exynos: Use dev_err/info function instead of pr_err/info
This patch uses dev_err/info function to show accurate log message with device name instead of pr_err/info function. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.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/exynos-cpufreq.c')
-rw-r--r--drivers/cpufreq/exynos-cpufreq.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 9c132550d910..c3e55aa28cf8 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -48,6 +48,7 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
48 struct cpufreq_policy *policy = cpufreq_cpu_get(0); 48 struct cpufreq_policy *policy = cpufreq_cpu_get(0);
49 unsigned int arm_volt, safe_arm_volt = 0; 49 unsigned int arm_volt, safe_arm_volt = 0;
50 unsigned int mpll_freq_khz = exynos_info->mpll_freq_khz; 50 unsigned int mpll_freq_khz = exynos_info->mpll_freq_khz;
51 struct device *dev = exynos_info->dev;
51 unsigned int old_freq; 52 unsigned int old_freq;
52 int index, old_index; 53 int index, old_index;
53 int ret = 0; 54 int ret = 0;
@@ -89,8 +90,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
89 /* Firstly, voltage up to increase frequency */ 90 /* Firstly, voltage up to increase frequency */
90 ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt); 91 ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
91 if (ret) { 92 if (ret) {
92 pr_err("%s: failed to set cpu voltage to %d\n", 93 dev_err(dev, "failed to set cpu voltage to %d\n",
93 __func__, arm_volt); 94 arm_volt);
94 return ret; 95 return ret;
95 } 96 }
96 } 97 }
@@ -99,8 +100,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
99 ret = regulator_set_voltage(arm_regulator, safe_arm_volt, 100 ret = regulator_set_voltage(arm_regulator, safe_arm_volt,
100 safe_arm_volt); 101 safe_arm_volt);
101 if (ret) { 102 if (ret) {
102 pr_err("%s: failed to set cpu voltage to %d\n", 103 dev_err(dev, "failed to set cpu voltage to %d\n",
103 __func__, safe_arm_volt); 104 safe_arm_volt);
104 return ret; 105 return ret;
105 } 106 }
106 } 107 }
@@ -114,8 +115,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
114 ret = regulator_set_voltage(arm_regulator, arm_volt, 115 ret = regulator_set_voltage(arm_regulator, arm_volt,
115 arm_volt); 116 arm_volt);
116 if (ret) { 117 if (ret) {
117 pr_err("%s: failed to set cpu voltage to %d\n", 118 dev_err(dev, "failed to set cpu voltage to %d\n",
118 __func__, arm_volt); 119 arm_volt);
119 goto out; 120 goto out;
120 } 121 }
121 } 122 }
@@ -162,6 +163,8 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
162 if (!exynos_info) 163 if (!exynos_info)
163 return -ENOMEM; 164 return -ENOMEM;
164 165
166 exynos_info->dev = &pdev->dev;
167
165 if (soc_is_exynos4210()) 168 if (soc_is_exynos4210())
166 ret = exynos4210_cpufreq_init(exynos_info); 169 ret = exynos4210_cpufreq_init(exynos_info);
167 else if (soc_is_exynos4212() || soc_is_exynos4412()) 170 else if (soc_is_exynos4212() || soc_is_exynos4412())
@@ -175,13 +178,13 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
175 goto err_vdd_arm; 178 goto err_vdd_arm;
176 179
177 if (exynos_info->set_freq == NULL) { 180 if (exynos_info->set_freq == NULL) {
178 pr_err("%s: No set_freq function (ERR)\n", __func__); 181 dev_err(&pdev->dev, "No set_freq function (ERR)\n");
179 goto err_vdd_arm; 182 goto err_vdd_arm;
180 } 183 }
181 184
182 arm_regulator = regulator_get(NULL, "vdd_arm"); 185 arm_regulator = regulator_get(NULL, "vdd_arm");
183 if (IS_ERR(arm_regulator)) { 186 if (IS_ERR(arm_regulator)) {
184 pr_err("%s: failed to get resource vdd_arm\n", __func__); 187 dev_err(&pdev->dev, "failed to get resource vdd_arm\n");
185 goto err_vdd_arm; 188 goto err_vdd_arm;
186 } 189 }
187 190
@@ -191,7 +194,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
191 if (!cpufreq_register_driver(&exynos_driver)) 194 if (!cpufreq_register_driver(&exynos_driver))
192 return 0; 195 return 0;
193 196
194 pr_err("%s: failed to register cpufreq driver\n", __func__); 197 dev_err(&pdev->dev, "failed to register cpufreq driver\n");
195 regulator_put(arm_regulator); 198 regulator_put(arm_regulator);
196err_vdd_arm: 199err_vdd_arm:
197 kfree(exynos_info); 200 kfree(exynos_info);