Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[cascardo/linux.git] / drivers / cpufreq / tegra-cpufreq.c
index c74c0e1..cd66b85 100644 (file)
 #include <linux/io.h>
 #include <linux/suspend.h>
 
-/* Frequency table index must be sequential starting at 0 */
 static struct cpufreq_frequency_table freq_table[] = {
-       { 0, 216000 },
-       { 1, 312000 },
-       { 2, 456000 },
-       { 3, 608000 },
-       { 4, 760000 },
-       { 5, 816000 },
-       { 6, 912000 },
-       { 7, 1000000 },
-       { 8, CPUFREQ_TABLE_END },
+       { .frequency = 216000 },
+       { .frequency = 312000 },
+       { .frequency = 456000 },
+       { .frequency = 608000 },
+       { .frequency = 760000 },
+       { .frequency = 816000 },
+       { .frequency = 912000 },
+       { .frequency = 1000000 },
+       { .frequency = CPUFREQ_TABLE_END },
 };
 
 #define NUM_CPUS       2
@@ -138,12 +137,12 @@ static int tegra_update_cpu_speed(struct cpufreq_policy *policy,
        if (ret) {
                pr_err("cpu-tegra: Failed to set cpu frequency to %d kHz\n",
                        freqs.new);
-               return ret;
+               freqs.new = freqs.old;
        }
 
        cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
 
-       return 0;
+       return ret;
 }
 
 static unsigned long tegra_cpu_highest_speed(void)