summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq_stats.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-06 18:39:03 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-24 01:06:43 +0300
commit9531347c61f689ac6de899a03ce91be4157277f7 (patch)
tree32a24e52c813996ded2cdeeabb157cb58e66e6e8 /drivers/cpufreq/cpufreq_stats.c
parent43b9cdaf5c22230269b8edd99ec78380a6ac0715 (diff)
downloadlinux-9531347c61f689ac6de899a03ce91be4157277f7.tar.xz
cpufreq: stats: initialize 'cur_time' on its definition
'cur_time' is defined in the first line and is then assigned a value in the next line. Initialize it while defining it. 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/cpufreq_stats.c')
-rw-r--r--drivers/cpufreq/cpufreq_stats.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 14f8d858a63d..21bec770569d 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -36,9 +36,8 @@ static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table);
static int cpufreq_stats_update(unsigned int cpu)
{
struct cpufreq_stats *stat;
- unsigned long long cur_time;
+ unsigned long long cur_time = get_jiffies_64();
- cur_time = get_jiffies_64();
spin_lock(&cpufreq_stats_lock);
stat = per_cpu(cpufreq_stats_table, cpu);
if (stat->time_in_state)