lkml.org 
[lkml]   [2017]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/7] cpufreq: make cpufreq_generic_init transition_latency default to CPUFREQ_ETERNAL
Date
If no valid transition_latency specified, let's make it default to
CPUFREQ_ETERNAL which is consistent with its definition.

This can save some of the same checkings like this:
transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev);
- if (!transition_latency)
- transition_latency = CPUFREQ_ETERNAL;
ret = cpufreq_generic_init(policy, freq_table, transition_latency);

Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
drivers/cpufreq/cpufreq.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 9bf97a3..da07de6 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -180,6 +180,8 @@ int cpufreq_generic_init(struct cpufreq_policy *policy,
return ret;
}

+ if (!transition_latency)
+ transition_latency = CPUFREQ_ETERNAL;
policy->cpuinfo.transition_latency = transition_latency;

/*
--
2.7.4
\
 
 \ /
  Last update: 2017-08-23 18:11    [W:0.268 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site