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>
This commit is contained in:
Len Brown
2010-05-22 16:57:26 -04:00
orang tua c0d64cb031
melakukan 752138df0d
5 mengubah file dengan 22 tambahan dan 9 penghapusan

Melihat File

@@ -14,7 +14,7 @@
#include "cpuidle.h"
struct cpuidle_driver *cpuidle_curr_driver;
static struct cpuidle_driver *cpuidle_curr_driver;
DEFINE_SPINLOCK(cpuidle_driver_lock);
/**
@@ -39,6 +39,15 @@ int cpuidle_register_driver(struct cpuidle_driver *drv)
EXPORT_SYMBOL_GPL(cpuidle_register_driver);
/**
* cpuidle_get_driver - return the current driver
*/
struct cpuidle_driver *cpuidle_get_driver(void)
{
return cpuidle_curr_driver;
}
EXPORT_SYMBOL_GPL(cpuidle_get_driver);
/**
* cpuidle_unregister_driver - unregisters a driver
* @drv: the driver