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>
This commit is contained in:
Viresh Kumar 2015-01-06 21:09:03 +05:30 committed by Rafael J. Wysocki
parent 43b9cdaf5c
commit 9531347c61
1 changed files with 1 additions and 2 deletions

View File

@ -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)