From patchwork Sun Sep 4 18:59:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 9312749 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58F8A6075E for ; Sun, 4 Sep 2016 19:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 492CA286C4 for ; Sun, 4 Sep 2016 19:02:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DFF92877D; Sun, 4 Sep 2016 19:02:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE687286F9 for ; Sun, 4 Sep 2016 19:02:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bgceb-0005Js-Ht; Sun, 04 Sep 2016 19:00:29 +0000 Received: from smtp12.smtpout.orange.fr ([80.12.242.134] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bgceW-00044i-I2 for linux-arm-kernel@lists.infradead.org; Sun, 04 Sep 2016 19:00:26 +0000 Received: from belgarion.home ([109.222.86.9]) by mwinf5d23 with ME id fWzs1t00J0C5QSM03Wzy7m; Sun, 04 Sep 2016 20:59:58 +0200 X-ME-Helo: belgarion.home X-ME-Date: Sun, 04 Sep 2016 20:59:58 +0200 X-ME-IP: 109.222.86.9 From: Robert Jarzmik To: Russell King , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King - ARM Linux Subject: [PATCH 3/3] [DO_NOT_REVIEW] sa1111: left up to Russell King Date: Sun, 4 Sep 2016 20:59:47 +0200 Message-Id: <1473015587-15589-3-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1473015587-15589-1-git-send-email-robert.jarzmik@free.fr> References: <1473015587-15589-1-git-send-email-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160904_120024_975255_89BDB70E X-CRM114-Status: GOOD ( 12.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to be able to cope with ordering problems, especially when the interrupt descriptor is allocated only after the sa1111 is probed, add a workaround to "wait" for the interrupt chip to be available. Signed-off-by: Robert Jarzmik --- arch/arm/common/sa1111.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 1b03ff639836..abd94ff83a6c 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -1183,6 +1184,9 @@ static int sa1111_probe(struct platform_device *pdev) if (irq < 0) return irq; + if (!irq_get_chip(irq)) + return -EPROBE_DEFER; + return __sa1111_probe(&pdev->dev, mem, irq); }