aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/longhaul.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/longhaul.c')
-rw-r--r--drivers/cpufreq/longhaul.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index 14df4974fb45..45bafddfd8ea 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -626,21 +626,12 @@ static void longhaul_setup_voltagescaling(void)
626 626
627 627
628static int longhaul_target(struct cpufreq_policy *policy, 628static int longhaul_target(struct cpufreq_policy *policy,
629 unsigned int target_freq, unsigned int relation) 629 unsigned int table_index)
630{ 630{
631 unsigned int table_index = 0;
632 unsigned int i; 631 unsigned int i;
633 unsigned int dir = 0; 632 unsigned int dir = 0;
634 u8 vid, current_vid; 633 u8 vid, current_vid;
635 634
636 if (cpufreq_frequency_table_target(policy, longhaul_table, target_freq,
637 relation, &table_index))
638 return -EINVAL;
639
640 /* Don't set same frequency again */
641 if (longhaul_index == table_index)
642 return 0;
643
644 if (!can_scale_voltage) 635 if (!can_scale_voltage)
645 longhaul_setstate(policy, table_index); 636 longhaul_setstate(policy, table_index);
646 else { 637 else {
@@ -919,7 +910,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
919 910
920static struct cpufreq_driver longhaul_driver = { 911static struct cpufreq_driver longhaul_driver = {
921 .verify = cpufreq_generic_frequency_table_verify, 912 .verify = cpufreq_generic_frequency_table_verify,
922 .target = longhaul_target, 913 .target_index = longhaul_target,
923 .get = longhaul_get, 914 .get = longhaul_get,
924 .init = longhaul_cpu_init, 915 .init = longhaul_cpu_init,
925 .exit = cpufreq_generic_exit, 916 .exit = cpufreq_generic_exit,