Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7aeb658d authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Kevin Hilman
Browse files

ARM: OMAP4: cpuidle - use the omap4_idle_data variable directly



We are storing the 'omap4_idle_data' in the private data field
of the cpuidle device. As we are using this variable only in this file,
that does not really make sense. Let's use the global variable directly.

Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: default avatarJean Pihet <j-pihet@ti.com>
Reviewed-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent d0d133d9
Loading
Loading
Loading
Loading
+3 −10
Original line number Original line Diff line number Diff line
@@ -24,7 +24,7 @@


#ifdef CONFIG_CPU_IDLE
#ifdef CONFIG_CPU_IDLE


/* Machine specific information to be recorded in the C-state driver_data */
/* Machine specific information */
struct omap4_idle_statedata {
struct omap4_idle_statedata {
	u32 cpu_state;
	u32 cpu_state;
	u32 mpu_logic_state;
	u32 mpu_logic_state;
@@ -65,8 +65,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
			struct cpuidle_driver *drv,
			struct cpuidle_driver *drv,
			int index)
			int index)
{
{
	struct omap4_idle_statedata *cx =
	struct omap4_idle_statedata *cx = &omap4_idle_data[index];
			cpuidle_get_statedata(&dev->states_usage[index]);
	u32 cpu1_state;
	u32 cpu1_state;
	int cpu_id = smp_processor_id();
	int cpu_id = smp_processor_id();


@@ -83,7 +82,7 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
	cpu1_state = pwrdm_read_pwrst(cpu1_pd);
	cpu1_state = pwrdm_read_pwrst(cpu1_pd);
	if (cpu1_state != PWRDM_POWER_OFF) {
	if (cpu1_state != PWRDM_POWER_OFF) {
		index = drv->safe_state_index;
		index = drv->safe_state_index;
		cx = cpuidle_get_statedata(&dev->states_usage[index]);
		cx = &omap4_idle_data[index];
	}
	}


	if (index > 0)
	if (index > 0)
@@ -176,15 +175,9 @@ static inline struct omap4_idle_statedata *_fill_cstate_usage(
					int idx)
					int idx)
{
{
	struct omap4_idle_statedata *cx = &omap4_idle_data[idx];
	struct omap4_idle_statedata *cx = &omap4_idle_data[idx];
	struct cpuidle_state_usage *state_usage = &dev->states_usage[idx];

	cpuidle_set_statedata(state_usage, cx);

	return cx;
	return cx;
}
}




/**
/**
 * omap4_idle_init - Init routine for OMAP4 idle
 * omap4_idle_init - Init routine for OMAP4 idle
 *
 *