cpufreq: dt: OPP layers handles clock-latency for V1 bindings as well
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 9 Feb 2016 05:00:42 +0000 (10:30 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Feb 2016 23:24:36 +0000 (00:24 +0100)
"clock-latency" is handled by OPP layer for all bindings and so there is
no need to make special calls for V1 bindings. Use
dev_pm_opp_get_max_clock_latency() for both the cases.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq-dt.c

index 0047d20803db79f3e71a503870c8e63e287f1280..4c9f8a828f6f11ea1aea2ddc791695bc804912c0 100644 (file)
@@ -265,10 +265,6 @@ static int cpufreq_init(struct cpufreq_policy *policy)
                if (ret)
                        dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n",
                                __func__, ret);
-
-               of_property_read_u32(np, "clock-latency", &transition_latency);
-       } else {
-               transition_latency = dev_pm_opp_get_max_clock_latency(cpu_dev);
        }
 
        priv = kzalloc(sizeof(*priv), GFP_KERNEL);
@@ -279,6 +275,7 @@ static int cpufreq_init(struct cpufreq_policy *policy)
 
        of_property_read_u32(np, "voltage-tolerance", &priv->voltage_tolerance);
 
+       transition_latency = dev_pm_opp_get_max_clock_latency(cpu_dev);
        if (!transition_latency)
                transition_latency = CPUFREQ_ETERNAL;