]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - arch/arm/mach-omap2/cpuidle44xx.c
ARM: OMAP4: cpuidle: Fix the C-state reporting to cpuidle governor.
[linux-imx.git] / arch / arm / mach-omap2 / cpuidle44xx.c
index cfdbb86bc84e5aae04357abce9b46d690ab0ccd7..72e018b9b260db422108f7d70084c7ae8d41ba2b 100644 (file)
@@ -65,7 +65,6 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
        struct timespec ts_preidle, ts_postidle, ts_idle;
        u32 cpu1_state;
        int idle_time;
-       int new_state_idx;
        int cpu_id = smp_processor_id();
 
        /* Used to keep track of the total time in idle */
@@ -84,8 +83,8 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
         */
        cpu1_state = pwrdm_read_pwrst(cpu1_pd);
        if (cpu1_state != PWRDM_POWER_OFF) {
-               new_state_idx = drv->safe_state_index;
-               cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]);
+               index = drv->safe_state_index;
+               cx = cpuidle_get_statedata(&dev->states_usage[index]);
        }
 
        if (index > 0)