From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934955AbcIFNDx (ORCPT ); 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 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 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(-) 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; -- 2.9.0