[kernel] generic-2.6/2.6.28: add missing Kconfig option
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1004-resume-timers-wq.patch.patch
1 From 62bc0d984e5c2778e09094ba2e4d885903c6c35b Mon Sep 17 00:00:00 2001
2 From: mokopatches <mokopatches@openmoko.org>
3 Date: Wed, 16 Jul 2008 14:44:10 +0100
4 Subject: [PATCH] resume-timers-wq.patch
5 The initialization of clocks uses mutexes, but we execute the resume in
6 an interrupt context. We therefore have to hand this task to a non-interrupt.
7
8 Adapted from a patch by Andy Green.
9 ---
10 arch/arm/plat-s3c24xx/time.c | 18 +++++++++++++++++-
11 1 files changed, 17 insertions(+), 1 deletions(-)
12
13 diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c24xx/time.c
14 index 766473b..f8d307b 100644
15 --- a/arch/arm/plat-s3c24xx/time.c
16 +++ b/arch/arm/plat-s3c24xx/time.c
17 @@ -253,8 +253,24 @@ static void __init s3c2410_timer_init (void)
18 setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
19 }
20
21 +static void s3c2410_timer_resume_work(struct work_struct *work)
22 +{
23 + s3c2410_timer_setup();
24 +}
25 +
26 +static void s3c2410_timer_resume(void)
27 +{
28 + static DECLARE_WORK(work, s3c2410_timer_resume_work);
29 + int res;
30 +
31 + res = schedule_work(&work);
32 + if (!res)
33 + printk(KERN_ERR
34 + "s3c2410_timer_resume_work already queued ???\n");
35 +}
36 +
37 struct sys_timer s3c24xx_timer = {
38 .init = s3c2410_timer_init,
39 .offset = s3c2410_gettimeoffset,
40 - .resume = s3c2410_timer_setup
41 + .resume = s3c2410_timer_resume,
42 };
43 --
44 1.5.6.3
45
This page took 0.053299 seconds and 5 git commands to generate.