Commit 4c1ed5a6 authored by Xunlei Pang's avatar Xunlei Pang Committed by Rafael J. Wysocki

cpuidle/coupled: Remove redundant 'dev' argument of cpuidle_state_is_coupled()

For cpuidle_state_is_coupled(), 'dev' is not used, so remove it.
Signed-off-by: default avatarXunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ba6a860d
...@@ -176,14 +176,12 @@ void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a) ...@@ -176,14 +176,12 @@ void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, atomic_t *a)
/** /**
* cpuidle_state_is_coupled - check if a state is part of a coupled set * cpuidle_state_is_coupled - check if a state is part of a coupled set
* @dev: struct cpuidle_device for the current cpu
* @drv: struct cpuidle_driver for the platform * @drv: struct cpuidle_driver for the platform
* @state: index of the target state in drv->states * @state: index of the target state in drv->states
* *
* Returns true if the target state is coupled with cpus besides this one * Returns true if the target state is coupled with cpus besides this one
*/ */
bool cpuidle_state_is_coupled(struct cpuidle_device *dev, bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state)
struct cpuidle_driver *drv, int state)
{ {
return drv->states[state].flags & CPUIDLE_FLAG_COUPLED; return drv->states[state].flags & CPUIDLE_FLAG_COUPLED;
} }
......
...@@ -210,7 +210,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, ...@@ -210,7 +210,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
tick_broadcast_exit(); tick_broadcast_exit();
} }
if (!cpuidle_state_is_coupled(dev, drv, entered_state)) if (!cpuidle_state_is_coupled(drv, entered_state))
local_irq_enable(); local_irq_enable();
diff = ktime_to_us(ktime_sub(time_end, time_start)); diff = ktime_to_us(ktime_sub(time_end, time_start));
...@@ -259,7 +259,7 @@ int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) ...@@ -259,7 +259,7 @@ int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
int cpuidle_enter(struct cpuidle_driver *drv, struct cpuidle_device *dev, int cpuidle_enter(struct cpuidle_driver *drv, struct cpuidle_device *dev,
int index) int index)
{ {
if (cpuidle_state_is_coupled(dev, drv, index)) if (cpuidle_state_is_coupled(drv, index))
return cpuidle_enter_state_coupled(dev, drv, index); return cpuidle_enter_state_coupled(dev, drv, index);
return cpuidle_enter_state(dev, drv, index); return cpuidle_enter_state(dev, drv, index);
} }
......
...@@ -34,15 +34,14 @@ extern int cpuidle_add_sysfs(struct cpuidle_device *dev); ...@@ -34,15 +34,14 @@ extern int cpuidle_add_sysfs(struct cpuidle_device *dev);
extern void cpuidle_remove_sysfs(struct cpuidle_device *dev); extern void cpuidle_remove_sysfs(struct cpuidle_device *dev);
#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED #ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
bool cpuidle_state_is_coupled(struct cpuidle_device *dev, bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state);
struct cpuidle_driver *drv, int state);
int cpuidle_enter_state_coupled(struct cpuidle_device *dev, int cpuidle_enter_state_coupled(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int next_state); struct cpuidle_driver *drv, int next_state);
int cpuidle_coupled_register_device(struct cpuidle_device *dev); int cpuidle_coupled_register_device(struct cpuidle_device *dev);
void cpuidle_coupled_unregister_device(struct cpuidle_device *dev); void cpuidle_coupled_unregister_device(struct cpuidle_device *dev);
#else #else
static inline bool cpuidle_state_is_coupled(struct cpuidle_device *dev, static inline
struct cpuidle_driver *drv, int state) bool cpuidle_state_is_coupled(struct cpuidle_driver *drv, int state)
{ {
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment