]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-3.0/sakoman/0009-rtc-twl-Use-threaded-IRQ-remove-IRQ-enable-in-interr.patch
linux 3.0: refresh all patches against 3.0.7
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-3.0 / sakoman / 0009-rtc-twl-Use-threaded-IRQ-remove-IRQ-enable-in-interr.patch
1 From 8c4508bad147a2eec870b7dd70f94f7aef4e921f Mon Sep 17 00:00:00 2001
2 From: Todd Poynor <toddpoynor@google.com>
3 Date: Wed, 27 Jul 2011 07:07:20 +0000
4 Subject: [PATCH 09/14] rtc: twl: Use threaded IRQ, remove IRQ enable in interrupt handler
6 IRQs disabled on entry to twl_rtc_interrupt is not a consequence
7 of LOCKDEP; both twl6030 and twl4030 explicitly disable IRQs
8 before calling the module IRQ handlers.
10 The ISR should not be enabling IRQs; use a threaded IRQ handler
11 instead.
13 Also fixes warnings:
15   WARNING: at kernel/irq/handle.c:130 handle_irq_event_percpu+nnn
16   irq nnn handler twl_rtc_interrupt+nnn enabled interrupts
18 Signed-off-by: Todd Poynor <toddpoynor@google.com>
19 ---
20  drivers/rtc/rtc-twl.c |   14 +++-----------
21  1 files changed, 3 insertions(+), 11 deletions(-)
23 diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
24 index f9a2799..3fee95e 100644
25 --- a/drivers/rtc/rtc-twl.c
26 +++ b/drivers/rtc/rtc-twl.c
27 @@ -362,14 +362,6 @@ static irqreturn_t twl_rtc_interrupt(int irq, void *rtc)
28         int res;
29         u8 rd_reg;
30  
31 -#ifdef CONFIG_LOCKDEP
32 -       /* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
33 -        * we don't want and can't tolerate.  Although it might be
34 -        * friendlier not to borrow this thread context...
35 -        */
36 -       local_irq_enable();
37 -#endif
38 -
39         res = twl_rtc_read_u8(&rd_reg, REG_RTC_STATUS_REG);
40         if (res)
41                 goto out;
42 @@ -462,9 +454,9 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
43         if (ret < 0)
44                 goto out1;
45  
46 -       ret = request_irq(irq, twl_rtc_interrupt,
47 -                               IRQF_TRIGGER_RISING,
48 -                               dev_name(&rtc->dev), rtc);
49 +       ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
50 +                                  IRQF_TRIGGER_RISING,
51 +                                  dev_name(&rtc->dev), rtc);
52         if (ret < 0) {
53                 dev_err(&pdev->dev, "IRQ is not free.\n");
54                 goto out1;
55 -- 
56 1.6.6.1