diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2012-10-26 06:26:24 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:34:19 -0500 |
commit | 1aef40e288acfb3cc28ff77528b34ef66683bed6 (patch) | |
tree | c62a1d0448a07aef5a987dac44135de3c74522b9 /drivers/cpuidle/cpuidle.h | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) |
cpuidle / sysfs: change function parameter
The function needs the cpuidle_device which is initially passed to the
caller.
The current code gets the struct device from the struct cpuidle_device,
pass it the cpuidle_add_sysfs function. This function calls
per_cpu(cpuidle_devices, cpu) to get the cpuidle_device.
This patch pass the cpuidle_device instead and simplify the code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/cpuidle.h')
-rw-r--r-- | drivers/cpuidle/cpuidle.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpuidle/cpuidle.h b/drivers/cpuidle/cpuidle.h index 76e7f696ad8c..2120d9e937c7 100644 --- a/drivers/cpuidle/cpuidle.h +++ b/drivers/cpuidle/cpuidle.h | |||
@@ -29,8 +29,8 @@ extern int cpuidle_add_interface(struct device *dev); | |||
29 | extern void cpuidle_remove_interface(struct device *dev); | 29 | extern void cpuidle_remove_interface(struct device *dev); |
30 | extern int cpuidle_add_state_sysfs(struct cpuidle_device *device); | 30 | extern int cpuidle_add_state_sysfs(struct cpuidle_device *device); |
31 | extern void cpuidle_remove_state_sysfs(struct cpuidle_device *device); | 31 | extern void cpuidle_remove_state_sysfs(struct cpuidle_device *device); |
32 | extern int cpuidle_add_sysfs(struct device *dev); | 32 | extern int cpuidle_add_sysfs(struct cpuidle_device *dev); |
33 | extern void cpuidle_remove_sysfs(struct device *dev); | 33 | extern void cpuidle_remove_sysfs(struct cpuidle_device *dev); |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | 35 | #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED |
36 | bool cpuidle_state_is_coupled(struct cpuidle_device *dev, | 36 | bool cpuidle_state_is_coupled(struct cpuidle_device *dev, |