cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 29 Apr 2013 13:24:46 +0000 (13:24 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 12 May 2013 12:04:15 +0000 (14:04 +0200)
If "/cpus" node isn't present or "clock-latency" isn't defined we are
returning error currently. Let's return CPUFREQ_ETERNAL instead, so
that we don't fail.

Flag appropriate messages to user in such cases.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/arm_big_little_dt.c

index d5ae4d2362e35f9cff05c828847bba50adf0c38f..173ed059d95f5fa2d46093d69b7912d1074df3de 100644 (file)
@@ -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 = {