diff mbox

[-next] rtc-twl: pass IRQF_ONESHOT to request_threaded_irq

Message ID 1337225749-7106-1-git-send-email-ming.lei@canonical.com
State Superseded
Headers show

Commit Message

Ming Lei May 17, 2012, 3:35 a.m. UTC
The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
otherwise the following failure message will be dumped because
hardware handler is defined as NULL:

[    3.329864] genirq: Threaded irq requested with handler=NULL and
!ONESHOT for irq 363
[    3.338226] twl_rtc twl_rtc: IRQ is not free.
[    3.346099] twl_rtc: probe of twl_rtc failed with error -22

The patch fixes the rtc-twl probe failure.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 drivers/rtc/rtc-twl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ming Lei June 14, 2012, 10:46 a.m. UTC | #1
On Thu, May 17, 2012 at 11:35 AM, Ming Lei <ming.lei@canonical.com> wrote:
> The flag of IRQF_ONESHOT should be passed to request_threaded_irq,
> otherwise the following failure message will be dumped because
> hardware handler is defined as NULL:
>
> [    3.329864] genirq: Threaded irq requested with handler=NULL and
> !ONESHOT for irq 363
> [    3.338226] twl_rtc twl_rtc: IRQ is not free.
> [    3.346099] twl_rtc: probe of twl_rtc failed with error -22
>
> The patch fixes the rtc-twl probe failure.
>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
>  drivers/rtc/rtc-twl.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
> index 258abea..c5d06fe 100644
> --- a/drivers/rtc/rtc-twl.c
> +++ b/drivers/rtc/rtc-twl.c
> @@ -510,7 +510,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev)
>        }
>
>        ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
> -                                  IRQF_TRIGGER_RISING,
> +                                  IRQF_TRIGGER_RISING | IRQF_ONESHOT,
>                                   dev_name(&rtc->dev), rtc);
>        if (ret < 0) {
>                dev_err(&pdev->dev, "IRQ is not free.\n");

Ping...

Without the patch, rtc can't be used on Pandaboard.

Thanks,
--
Ming Lei
diff mbox

Patch

diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 258abea..c5d06fe 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -510,7 +510,7 @@  static int __devinit twl_rtc_probe(struct platform_device *pdev)
 	}
 
 	ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt,
-				   IRQF_TRIGGER_RISING,
+				   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 				   dev_name(&rtc->dev), rtc);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "IRQ is not free.\n");