From patchwork Tue Sep 6 13:53:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101847 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp562487qgf; Tue, 6 Sep 2016 06:57:06 -0700 (PDT) X-Received: by 10.66.131.111 with SMTP id ol15mr72628441pab.105.1473170226458; Tue, 06 Sep 2016 06:57:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 136si5187778pfu.115.2016.09.06.06.57.06; Tue, 06 Sep 2016 06:57:06 -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 S1756363AbcIFN4v (ORCPT + 27 others); Tue, 6 Sep 2016 09:56:51 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:55312 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756272AbcIFN4r (ORCPT ); Tue, 6 Sep 2016 09:56:47 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MdCIE-1bP3Fz3JXG-00ICr8; Tue, 06 Sep 2016 15:56:33 +0200 From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , Lee Jones , Linus Walleij , Thomas Gleixner , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] mfd: ucb1x00: remove NO_IRQ check Date: Tue, 6 Sep 2016 15:53:29 +0200 Message-Id: <20160906135637.2622666-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160906135637.2622666-1-arnd@arndb.de> References: <20160906135637.2622666-1-arnd@arndb.de> X-Provags-ID: V03:K0:rPPXAngJghnLl3mN9kVoC835CjWbuiITD5O5318cfq5MzQ31sed 3CSrQDoMMwW5bpZpa66YE1cMioEYloVvMc9eBPhYnxwvzQ0X7CeJ94YTML8qNMiPNRmfoDW PyQ11IOsU6PGwM1o7qrrnD8mH5vrdBRTX7DJ8L4u2ICqI/tYljtXUFK7eXKcxRjOjamE9Q5 3NPc9+nJvLABoqvDAbzkQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:qDQ/IqOcGj4=:uK+PV2vEHvaBXIr0hQ5Ih1 sJhByw2qd+aoSs9D8AP/1TSEj5gQyG2r0zPc3510ut2888okTQKt2XeievZK3rMpvrz9d1eph EFA/EKbEzgZqoiX/KmjQpeGYyryt1UmHuilA/bqB81/FCjpFHyQ3zWX+1Tc9RIerYCbtm9/gO SJM7YKxB6m3espO07ricjbTyTk/8LBZbr+ypfttSqNrKqpxnPPhCUCVN19i3EymITk+KaLCNi 61cWJh1RzV0B3OXmFChD9Z4S6Rk/jSxyq6UEaXtLeNz6e61j0Oh0W2TmWXA+hPBEQMBNHRPvR f7vXRhl8SP1+8wrMe95K9NSV4EoTqfvS0cWXWEpvXfbbW1CyIbO5kdVosy25tNTLlzM/OSiG+ VNl2Hk+12/f2jPYMW6GAzmUmLmMrXzqv9EQ/6kwUixm3LPc0T9yXoGH4e9XKgD1RucJiE+ZE+ 2PKux5urtNwV4oLGGSt8MH+h57pp6MzePuVZ/UeEvHTv2A+8g6J0/N44EAV+HrCbJSDhnoNou Q6lDbJsF5Bv0UlMI12q+UQXmXXVdHv1wDVvUsI21ZROvZlSZ0uvYA7JiwdZh4rvVpkWcEdgcX DyPFdoucmKwhwX4OTNg6ntLxqUFxR62FaasuxCbpfbd65quHHYmlHPebIa0Gg6jEaiqNW8nae T4wKZ7u1CJynSOiLlsF26DbCTXeEeRbiwTP59eQoFoH2Rn5dAg0a+7G2tjWkqtI6rq7I= 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;