diff options
Diffstat (limited to 'arch/arm/kernel/sched_clock.c')
-rw-r--r-- | arch/arm/kernel/sched_clock.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c index 5416c7c12528..27d186abbc06 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/arch/arm/kernel/sched_clock.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/jiffies.h> | 10 | #include <linux/jiffies.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/syscore_ops.h> | ||
13 | #include <linux/timer.h> | 14 | #include <linux/timer.h> |
14 | 15 | ||
15 | #include <asm/sched_clock.h> | 16 | #include <asm/sched_clock.h> |
@@ -164,3 +165,20 @@ void __init sched_clock_postinit(void) | |||
164 | 165 | ||
165 | sched_clock_poll(sched_clock_timer.data); | 166 | sched_clock_poll(sched_clock_timer.data); |
166 | } | 167 | } |
168 | |||
169 | static int sched_clock_suspend(void) | ||
170 | { | ||
171 | sched_clock_poll(sched_clock_timer.data); | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static struct syscore_ops sched_clock_ops = { | ||
176 | .suspend = sched_clock_suspend, | ||
177 | }; | ||
178 | |||
179 | static int __init sched_clock_syscore_init(void) | ||
180 | { | ||
181 | register_syscore_ops(&sched_clock_ops); | ||
182 | return 0; | ||
183 | } | ||
184 | device_initcall(sched_clock_syscore_init); | ||