From patchwork Tue Sep 6 13:03:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101860 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp536772qgf; Tue, 6 Sep 2016 06:03:58 -0700 (PDT) X-Received: by 10.66.138.37 with SMTP id qn5mr32960053pab.33.1473167037003; Tue, 06 Sep 2016 06:03:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si35428679pfg.243.2016.09.06.06.03.56; Tue, 06 Sep 2016 06:03:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935059AbcIFNDx (ORCPT + 27 others); Tue, 6 Sep 2016 09:03:53 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:57891 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932231AbcIFNDv (ORCPT ); Tue, 6 Sep 2016 09:03:51 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0M944P-1bmzBz1b6j-00CSDC; Tue, 06 Sep 2016 15:03:34 +0200 From: Arnd Bergmann To: Lee Jones Cc: Arnd Bergmann , Linus Walleij , Hans-Christian Egtvedt , Dmitry Torokhov , Thomas Gleixner , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH] mfd: ucb1x00: remove NO_IRQ check Date: Tue, 6 Sep 2016 15:03:57 +0200 Message-Id: <20160906130409.1691750-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:yhqJk+dP7/GRuEBq91qrrf8h7aVhftzm/Tb0xtaC9cESxSz7Rin v2QkijRvWqRSoJStJnu3figS00vA2UDgao6EUfq8Kyquv6ME1uKbk9z/l+4/qhY+jmM98Py 72M3TyaDrOZiQvfRfKmTF8t5CALWqnNOq8FfyPg0EbJmw7pvNO7GJOXfi3wzv1xeWu+v/GU fpbMLPqI55LNHAZIUmnGg== X-UI-Out-Filterresults: notjunk:1; V01:K0:d+mPjmvo/aE=:49/MDjugv/0KzGCAtXzIJD 9uqGXzaAYcgQuPlk/pHpVBAPk7UjjNmJAw1q3sYVKbDnwAWDltC51RVD0c9WVK2pjN6QDKnHp OLjtHN5LcymNkfA8HmHiLhS3ylRsErL9P4ezbqRCzNZpD0MySRUUpSsoZ3jiFYHDgt7UT6KhX htrFL/Is35ZkkwLDALSQSY90P5BZv9vK9eLeqvcL6QINvBZppK2WfeAxPaZTmEhynIxLNaI7Q b7hvzMpzhatGXfAHaPVuNkeCzQpPluWDgalaucrdvdp/H6mxGR2hyP/Fc0ET8j30azJrQgzCF WER1cbfF08jwaFhqg2iLX+9hByjLIRXtyzI7g+0XyLAPiReGAApOaFD0XHz4/Tlb45Imm09Fh kvRv6lzR2rFFQ6Liz6412V3sL/qx1jR7rvJ3tBYfcZLhSIZDUpzard5/9Z0+BCdHxZPZSum5Z N5FQkptgH9yjhmDEcfjLpvkvlHNjg4n0KrmypVARogx4v3nA/twFDhEhFuZBwVXnkLj5OqnrG bvIgGBf9GVjVWxPZXBajltgSDRTIWp/4qrf94rlFF9sv+WE18qWhK4aQF++whlF510pTyu0o+ 9+Zhldc5O1oTPFKZWkD4b8HWz3A2zvDRtiC5N5EBQbzN2m2BkHq60F1NHHMJehGuFDzoiwiXZ ESRy7LwPfuRPTYC1BaAdwD6sSjTp7Hg/vTZwZNe6ogtWV+pNBh5VOcHJGoTjtijwBI6c= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org probe_irq_off() returns '0' on failure, not NO_IRQ, so the check in this driver is clearly wrong. This replaces it with the regular '!irq' check used in other drivers. The sa1100 platform that this driver is used on originally numbered all its interrupts starting at '0', which would have conflicted with this change, but as of commit 18f3aec ("ARM: 8230/1: sa1100: shift IRQs by one"), this is not a problem any more. Signed-off-by: Arnd Bergmann --- drivers/mfd/ucb1x00-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 48bea5038654..d6fb2e1a759a 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c @@ -537,7 +537,7 @@ static int ucb1x00_probe(struct mcp *mcp) ucb1x00_enable(ucb); ucb->irq = ucb1x00_detect_irq(ucb); ucb1x00_disable(ucb); - if (ucb->irq == NO_IRQ) { + if (!ucb->irq) { dev_err(&ucb->dev, "IRQ probe failed\n"); ret = -ENODEV; goto err_no_irq;