Skip to content

Commit

Permalink
cpuidle/coupled: Remove cpuidle_device::safe_state_index
Browse files Browse the repository at this point in the history
cpuidle_device::safe_state_index need to be initialized before
use, it should be the same as cpuidle_driver::safe_state_index.

We tackled this issue by removing the safe_state_index from the
cpuidle_device structure and use the one in the cpuidle_driver
structure instead.

Suggested-by: Daniel Lezcano <[email protected]>
Signed-off-by: Xunlei Pang <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Xunlei Pang authored and rafaeljw committed Aug 28, 2015
1 parent c75b89e commit ba6a860
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/cpuidle/coupled.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
return entered_state;
}
entered_state = cpuidle_enter_state(dev, drv,
dev->safe_state_index);
drv->safe_state_index);
local_irq_disable();
}

Expand Down Expand Up @@ -521,7 +521,7 @@ int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
}

entered_state = cpuidle_enter_state(dev, drv,
dev->safe_state_index);
drv->safe_state_index);
local_irq_disable();
}

Expand Down
1 change: 0 additions & 1 deletion include/linux/cpuidle.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ struct cpuidle_device {
struct list_head device_list;

#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
int safe_state_index;
cpumask_t coupled_cpus;
struct cpuidle_coupled *coupled;
#endif
Expand Down

0 comments on commit ba6a860

Please sign in to comment.