Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270162
b: refs/heads/master
c: 6f3eaec
h: refs/heads/master
v: v3
  • Loading branch information
Colin Cross authored and Santosh Shilimkar committed Sep 23, 2011
1 parent 5b29e18 commit 141f2d5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab10023e0088d5075354afc7cb9e72304757dddd
refs/heads/master: 6f3eaec87b6b17bfa49cb3b5b8d07fa84be18512
33 changes: 33 additions & 0 deletions trunk/kernel/cpu_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/spinlock.h>
#include <linux/syscore_ops.h>

static DEFINE_RWLOCK(cpu_pm_notifier_lock);
static RAW_NOTIFIER_HEAD(cpu_pm_notifier_chain);
Expand Down Expand Up @@ -198,3 +199,35 @@ int cpu_cluster_pm_exit(void)
return ret;
}
EXPORT_SYMBOL_GPL(cpu_cluster_pm_exit);

#ifdef CONFIG_PM
static int cpu_pm_suspend(void)
{
int ret;

ret = cpu_pm_enter();
if (ret)
return ret;

ret = cpu_cluster_pm_enter();
return ret;
}

static void cpu_pm_resume(void)
{
cpu_cluster_pm_exit();
cpu_pm_exit();
}

static struct syscore_ops cpu_pm_syscore_ops = {
.suspend = cpu_pm_suspend,
.resume = cpu_pm_resume,
};

static int cpu_pm_init(void)
{
register_syscore_ops(&cpu_pm_syscore_ops);
return 0;
}
core_initcall(cpu_pm_init);
#endif

0 comments on commit 141f2d5

Please sign in to comment.