From patchwork Fri Jul 6 16:33:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 1166701 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id DF755DF236 for ; Fri, 6 Jul 2012 16:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757938Ab2GFQd6 (ORCPT ); Fri, 6 Jul 2012 12:33:58 -0400 Received: from na3sys009aog121.obsmtp.com ([74.125.149.145]:46478 "EHLO na3sys009aog121.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757868Ab2GFQd5 (ORCPT ); Fri, 6 Jul 2012 12:33:57 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]) (using TLSv1) by na3sys009aob121.postini.com ([74.125.148.12]) with SMTP ID DSNKT/cTdI5+fWOxrMkbcwu1Nkdod2ansNoH@postini.com; Fri, 06 Jul 2012 09:33:57 PDT Received: by pbbrr13 with SMTP id rr13so18258542pbb.26 for ; Fri, 06 Jul 2012 09:33:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=1MPgaX61vgVxvMJeG/bdZzPpMQabFTB5JhLiy7dOwTc=; b=Q9fhVTlTCxN4yNSrbkMvfVVM8NpYP5DKCxXXCEVZTgpCOuQPAdx+pc218WPT8oSfrV 9cCvErObs/b+TUoUEswiaB16avM+lkuncm7kfPGgAxSoqcjcQyrukjQpu2xiDBlmmzDx 3XUSLFqgc+d0W7DNFWD82kfTwThv5fAyFxbl6+a/VUfxwJtlaF9NCpHXzqOQaHWtmOdK uHKVj3KBfdeVnShfgSNbIRaKDrE1TBU+pBaTtXYKndoRW6KcWwJOCa/LnlWlbPyIatCh hml1xRh+DLNsHC4XGoOgf+mT38Pt0QidU5Q4R301/JZnP2+30ArvRxFfmCC9TymwL1sr obUA== Received: by 10.68.220.231 with SMTP id pz7mr38053512pbc.110.1341592436376; Fri, 06 Jul 2012 09:33:56 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPS id jv6sm22153580pbc.40.2012.07.06.09.33.55 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 Jul 2012 09:33:55 -0700 (PDT) From: Kevin Hilman To: Andrew Morton , rtc-linux@googlegroups.com, Alessandro Zummo Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/rtc/rtc-twl.c: fix threaded IRQ to use IRQF_ONESHOT Date: Fri, 6 Jul 2012 09:33:54 -0700 Message-Id: <1341592434-4207-1-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.9.2 X-Gm-Message-State: ALoCoQmBVbus5J/jzQW3Io7q6hqGSFdiEqwLPLzX6ncl4G4LOj76M7zp4NemK1dpQgkTnQgqv/if Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Requesting a threaded interrupt without a primary handler and without IRQF_ONESHOT is dangerous, and after commit 1c6c6952 (genirq: Reject bogus threaded irq requests), these requests are rejected. This causes ->probe() to fail, and the RTC driver not to be availble. To fix, add IRQF_ONESHOT to the IRQ flags. Tested on OMAP3730/OveroSTORM and OMAP4430/Panda board using rtcwake to wake from system suspend multiple times. Signed-off-by: Kevin Hilman --- Resending to broader audience and including Andrew. Since, I understand that drivers/rtc is somewhat orphaned, Andrew, can you queue this fix for v3.5. Thanks. 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");