summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle/cpuidle.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-07-19 00:02:53 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-19 00:02:53 +0200
commit3db0bc97678d7de32f25514b290a0ca028dd4512 (patch)
tree45729aa3a8cecff0e4d4c1d27c2459109ae5a749 /drivers/cpuidle/cpuidle.c
parentd9914cf66181b8aa0929775f5c6f675c6ebc3eb5 (diff)
parentaa713cc3b22ccd24dc55df4e0770490781fe6a76 (diff)
downloadop-kernel-dev-3db0bc97678d7de32f25514b290a0ca028dd4512.zip
op-kernel-dev-3db0bc97678d7de32f25514b290a0ca028dd4512.tar.gz
Merge branch 'pm-cpuidle'
Diffstat (limited to 'drivers/cpuidle/cpuidle.c')
-rw-r--r--drivers/cpuidle/cpuidle.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index d90519c..efa9a2c 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -201,6 +201,22 @@ void cpuidle_resume_and_unlock(void)
EXPORT_SYMBOL_GPL(cpuidle_resume_and_unlock);
+/* Currently used in suspend/resume path to suspend cpuidle */
+void cpuidle_pause(void)
+{
+ mutex_lock(&cpuidle_lock);
+ cpuidle_uninstall_idle_handler();
+ mutex_unlock(&cpuidle_lock);
+}
+
+/* Currently used in suspend/resume path to resume cpuidle */
+void cpuidle_resume(void)
+{
+ mutex_lock(&cpuidle_lock);
+ cpuidle_install_idle_handler();
+ mutex_unlock(&cpuidle_lock);
+}
+
/**
* cpuidle_wrap_enter - performs timekeeping and irqen around enter function
* @dev: pointer to a valid cpuidle_device object
@@ -265,7 +281,6 @@ static void poll_idle_init(struct cpuidle_driver *drv)
state->power_usage = -1;
state->flags = 0;
state->enter = poll_idle;
- state->disable = 0;
}
#else
static void poll_idle_init(struct cpuidle_driver *drv) {}
OpenPOWER on IntegriCloud