aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-08-28 01:52:26 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-08 19:44:40 -0400
commit48a8624b3abe39bd66490e3ab692a74a73b582eb (patch)
treeb3225525d63067a36fa1adcd9f5938da8a2e48a0 /drivers/cpufreq
parented4b053cb864f29f57cf5a4c3f3c85cda22edaf1 (diff)
cpufreq: cpu0: print relevant error when we defer probe
Currently, we defer probe if regulator_get() returned -EPROBE_DEFER, i.e. regulator isn't registered yet. We do a dev_err() in this case. Sending a message to the log on probe defer just duplicates what the driver core is already doing. Convert it to dev_dbg() instead. We should defer in case of clk_get() as well. Current code already does it, but it wasn't intentional probably. Its just that we are returning the right error with wrong print message. Fix print message to convey right error. Tested-by: Stephen Boyd <sboyd@codeaurora.org> 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')
-rw-r--r--drivers/cpufreq/cpufreq-cpu0.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index d2dc9216a2f2..eb07e3f996b3 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -151,7 +151,16 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
151 cpu_clk = clk_get(cpu_dev, NULL); 151 cpu_clk = clk_get(cpu_dev, NULL);
152 if (IS_ERR(cpu_clk)) { 152 if (IS_ERR(cpu_clk)) {
153 ret = PTR_ERR(cpu_clk); 153 ret = PTR_ERR(cpu_clk);
154 pr_err("failed to get cpu0 clock: %d\n", ret); 154
155 /*
156 * If cpu's clk node is present, but clock is not yet
157 * registered, we should try defering probe.
158 */
159 if (ret == -EPROBE_DEFER)
160 dev_dbg(cpu_dev, "cpu0 clock not ready, retry\n");
161 else
162 dev_err(cpu_dev, "failed to get cpu0 clock: %d\n", ret);
163
155 goto out_put_reg; 164 goto out_put_reg;
156 } 165 }
157 166