diff options
author | Len Brown <len.brown@intel.com> | 2010-05-22 16:57:26 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-05-27 21:06:58 -0400 |
commit | 752138df0dc2daaae09379c754caeb08c97905dc (patch) | |
tree | 4908627df11ccb42570fc3525c560f89c444781c /drivers/cpuidle/driver.c | |
parent | c0d64cb031c21f163a0ec15cf10844bcf0ceedcf (diff) |
cpuidle: make cpuidle_curr_driver static
cpuidle_register_driver() sets cpuidle_curr_driver
cpuidle_unregister_driver() clears cpuidle_curr_driver
We should't expose cpuidle_curr_driver to
potential modification except via these interfaces.
So make it static and create cpuidle_get_driver() to observe it.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/cpuidle/driver.c')
-rw-r--r-- | drivers/cpuidle/driver.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 826b5c0aa12b..fd1601e3d125 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include "cpuidle.h" | 15 | #include "cpuidle.h" |
16 | 16 | ||
17 | struct cpuidle_driver *cpuidle_curr_driver; | 17 | static struct cpuidle_driver *cpuidle_curr_driver; |
18 | DEFINE_SPINLOCK(cpuidle_driver_lock); | 18 | DEFINE_SPINLOCK(cpuidle_driver_lock); |
19 | 19 | ||
20 | /** | 20 | /** |
@@ -40,6 +40,15 @@ int cpuidle_register_driver(struct cpuidle_driver *drv) | |||
40 | EXPORT_SYMBOL_GPL(cpuidle_register_driver); | 40 | EXPORT_SYMBOL_GPL(cpuidle_register_driver); |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * cpuidle_get_driver - return the current driver | ||
44 | */ | ||
45 | struct cpuidle_driver *cpuidle_get_driver(void) | ||
46 | { | ||
47 | return cpuidle_curr_driver; | ||
48 | } | ||
49 | EXPORT_SYMBOL_GPL(cpuidle_get_driver); | ||
50 | |||
51 | /** | ||
43 | * cpuidle_unregister_driver - unregisters a driver | 52 | * cpuidle_unregister_driver - unregisters a driver |
44 | * @drv: the driver | 53 | * @drv: the driver |
45 | */ | 54 | */ |