If "/cpus" node isn't found or "clock-latency" isn't defined we are returning
error currently. Lets return CPUFREQ_ETERNAL instead, so that we don't fail.

Flag appropriate messages to user in such cases.

Signed-off-by: Viresh Kumar <viresh.ku...@linaro.org>
---
 drivers/cpufreq/arm_big_little_dt.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/arm_big_little_dt.c 
b/drivers/cpufreq/arm_big_little_dt.c
index d5ae4d2..173ed05 100644
--- a/drivers/cpufreq/arm_big_little_dt.c
+++ b/drivers/cpufreq/arm_big_little_dt.c
@@ -66,8 +66,8 @@ static int dt_get_transition_latency(struct device *cpu_dev)
 
        parent = of_find_node_by_path("/cpus");
        if (!parent) {
-               pr_err("failed to find OF /cpus\n");
-               return -ENOENT;
+               pr_info("Failed to find OF /cpus. Use CPUFREQ_ETERNAL 
transition latency\n");
+               return CPUFREQ_ETERNAL;
        }
 
        for_each_child_of_node(parent, np) {
@@ -81,7 +81,8 @@ static int dt_get_transition_latency(struct device *cpu_dev)
                return transition_latency;
        }
 
-       return -ENODEV;
+       pr_info("clock-latency isn't found, use CPUFREQ_ETERNAL transition 
latency\n");
+       return CPUFREQ_ETERNAL;
 }
 
 static struct cpufreq_arm_bL_ops dt_bL_ops = {
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to