Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
Resolved migration conflicts from kernel 4.9 to 4.14.
- rename cpufreq_device -> cpufreq_cdev
Change-Id: I59cab68f8a57608fe60963da5f69fcced809b397
unsigned long voltage, int temperature, u32 *power)
{
int volt_index = 0, temp_index = 0;
+ int index = 0;
int num_cpus;
int max_cpus;
struct cpufreq_policy *policy = cpufreq_cdev->policy;
if (temp_index > cpufreq_cdev->var_temp_size)
temp_index = cpufreq_cdev->var_temp_size;
- *power = (unsigned int)cpufreq_cdev->var_table[volt_index * (cpufreq_cdev->var_temp_size + 1) + temp_index] * num_cpus / max_cpus;
+ index = (int)(volt_index * (cpufreq_cdev->var_temp_size + 1) + temp_index);
+ *power = (unsigned int)cpufreq_cdev->var_table[index] * num_cpus / max_cpus;
return 0;
}