@@ -24,13 +24,13 @@ DEFINE_SPINLOCK(cpuidle_driver_lock);
static DEFINE_PER_CPU(struct cpuidle_driver *, cpuidle_drivers);
/**
- * __cpuidle_get_cpu_driver - return the cpuidle driver tied to a CPU.
+ * cpuidle_get_cpu_driver - return the cpuidle driver tied to a CPU.
* @cpu: the CPU handled by the driver
*
* Returns a pointer to struct cpuidle_driver or NULL if no driver has been
* registered for @cpu.
*/
-static struct cpuidle_driver *__cpuidle_get_cpu_driver(int cpu)
+struct cpuidle_driver *cpuidle_get_cpu_driver(int cpu)
{
return per_cpu(cpuidle_drivers, cpu);
}
@@ -49,7 +49,7 @@ static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv)
for_each_cpu(cpu, drv->cpumask) {
- if (drv != __cpuidle_get_cpu_driver(cpu))
+ if (drv != cpuidle_get_cpu_driver(cpu))
continue;
per_cpu(cpuidle_drivers, cpu) = NULL;
@@ -71,7 +71,7 @@ static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
for_each_cpu(cpu, drv->cpumask) {
- if (__cpuidle_get_cpu_driver(cpu)) {
+ if (cpuidle_get_cpu_driver(cpu)) {
__cpuidle_unset_driver(drv);
return -EBUSY;
}
@@ -87,13 +87,13 @@ static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
static struct cpuidle_driver *cpuidle_curr_driver;
/**
- * __cpuidle_get_cpu_driver - return the global cpuidle driver pointer.
+ * cpuidle_get_cpu_driver - return the global cpuidle driver pointer.
* @cpu: ignored without the multiple driver support
*
* Return a pointer to a struct cpuidle_driver object or NULL if no driver was
* previously registered.
*/
-static inline struct cpuidle_driver *__cpuidle_get_cpu_driver(int cpu)
+inline struct cpuidle_driver *cpuidle_get_cpu_driver(int cpu)
{
return cpuidle_curr_driver;
}
@@ -321,7 +321,7 @@ struct cpuidle_driver *cpuidle_get_driver(void)
int cpu;
cpu = get_cpu();
- drv = __cpuidle_get_cpu_driver(cpu);
+ drv = cpuidle_get_cpu_driver(cpu);
put_cpu();
return drv;
@@ -134,6 +134,7 @@ extern int cpuidle_enter(struct cpuidle_driver *drv,
extern void cpuidle_reflect(struct cpuidle_device *dev, int index);
extern int cpuidle_register_driver(struct cpuidle_driver *drv);
+extern struct cpuidle_driver *cpuidle_get_cpu_driver(int cpu);
extern struct cpuidle_driver *cpuidle_get_driver(void);
extern struct cpuidle_driver *cpuidle_driver_ref(void);
extern void cpuidle_driver_unref(void);
@@ -168,6 +169,8 @@ static inline int cpuidle_enter(struct cpuidle_driver *drv,
static inline void cpuidle_reflect(struct cpuidle_device *dev, int index) { }
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
{return -ENODEV; }
+static inline struct cpuidle_driver *cpuidle_get_cpu_driver(int cpu)
+{return NULL; }
static inline struct cpuidle_driver *cpuidle_get_driver(void) {return NULL; }
static inline struct cpuidle_driver *cpuidle_driver_ref(void) {return NULL; }
static inline void cpuidle_driver_unref(void) {}