From patchwork Tue Sep 6 13:53:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101849 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp562278qgf; Tue, 6 Sep 2016 06:56:39 -0700 (PDT) X-Received: by 10.98.11.65 with SMTP id t62mr40658169pfi.51.1473170198887; Tue, 06 Sep 2016 06:56:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vu8si35470827pab.180.2016.09.06.06.56.37; Tue, 06 Sep 2016 06:56:38 -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 S1756213AbcIFN4f (ORCPT + 27 others); Tue, 6 Sep 2016 09:56:35 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57315 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755578AbcIFN43 (ORCPT ); Tue, 6 Sep 2016 09:56:29 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LgQuz-1bKMkx0RYD-00nyjx; Tue, 06 Sep 2016 15:56:02 +0200 From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Date: Tue, 6 Sep 2016 15:53:27 +0200 Message-Id: <20160906135637.2622666-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:X6B94zil5TEUqp7YMEOH5n4pjOzJFLHDPWR0MNLjru+VGINaW1I vouvawK0vdr+0VUoMkXsw2GVfCCZjsemrX3NzC9p9PuCMSYJ8nhQkrc0M5MWWIT+rBEIZj2 HfX7jZH/Dobna274rPT2rRr6wwWAQ313rn92bP7zKYg2cMMFpylTAR7csZBBiuxS84Trqtx YyiSrbtfpjdywR6SivoFw== X-UI-Out-Filterresults: notjunk:1; V01:K0:uN1WCF11gtI=:VSTcArXpCF5goTZ2+TX6DZ kH5mfprQqKXoqmRFQJK4rotSCcxkoPja11TJq8KM69IaJbM5qzj7axpQEvMvxI9qF0FD6zLyY 9t+pus156dfYM+jRxX00rhZ0vNN5Bc7wfnC9BURcUtDPyt1qqTW+Z8cithzA0Y9VgLbNjjuYO w0EGyXG4m9j0jX4ROgk5dSxc+K5m14634tZ7kpgJAMu2kSpFw7//AN5FIuTMdOWaLfP1dPOs2 kkZfw2J7vcpyr6Thyqovebkc5iJQDqUsqd2CVigVkRJhflRpTqs3T4qvk8y1oBumDAnYeXTup jsEW+nnLZfViMZypKMqffQ3sgNkOocuiVD3f5Knu8rc3Gm+FhntlCn3Z13ouiaxiyQ78TEjDy vjB8K9BUjpAkIsKo52v0xtqIngVN3993xoeFK/u+7EMc0B3I9EAAKMT4/7GnLDz946ujPauWv XSA5rbrSS2lRPb4zbK0mlMrCv+Z6CiiJqrofebkGxLTagoNR0gbrgxavmgBON4dyRydtmvm0h d6+ikdvfxDefO1UI7UUP5vaARfv7znWWIOP6JH/bXEmaXfwuVaNn+QXiix7kBAU86meQXFY3V kCfaRuYFen8OFgKFoJlylfG/dsc/38KgHOtdLhnUULKzThQxfxXm8FwwSje4z62+RrsWf/25L rt1pGCOaO9rInMVbPjs7NIZuxXqdrCDIkxmDxbDyNVGZwPjUcJVzNbYfIeRd4t/srIfY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 489447380a29 ("[PATCH] handle errors returned by platform_get_irq*()") ten years ago, the sa1111 driver refuses to work without an interrupt line passed in its resources, so the check for NO_IRQ is unnecessary. I have also checked that all four machines files that register an sa1111 device (lubbock, badge4, journada720, and neponset) do set an interrupt line. Signed-off-by: Arnd Bergmann --- arch/arm/common/sa1111.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) -- 2.9.0 diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index fb0a0a4dfea4..64d8cf08b7d0 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -751,11 +751,9 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq) * The interrupt controller must be initialised before any * other device to ensure that the interrupts are available. */ - if (sachip->irq != NO_IRQ) { - ret = sa1111_setup_irq(sachip, pd->irq_base); - if (ret) - goto err_unmap; - } + ret = sa1111_setup_irq(sachip, pd->irq_base); + if (ret) + goto err_unmap; #ifdef CONFIG_ARCH_SA1100 { @@ -834,12 +832,10 @@ static void __sa1111_remove(struct sa1111 *sachip) clk_disable(sachip->clk); clk_unprepare(sachip->clk); - if (sachip->irq != NO_IRQ) { - irq_set_chained_handler_and_data(sachip->irq, NULL, NULL); - irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); + irq_set_chained_handler_and_data(sachip->irq, NULL, NULL); + irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); - release_mem_region(sachip->phys + SA1111_INTC, 512); - } + release_mem_region(sachip->phys + SA1111_INTC, 512); iounmap(sachip->base); clk_put(sachip->clk); From patchwork Tue Sep 6 13:53:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101848 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp562482qgf; Tue, 6 Sep 2016 06:57:06 -0700 (PDT) X-Received: by 10.66.163.129 with SMTP id yi1mr7063945pab.47.1473170226080; 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.05; 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 S1756325AbcIFN4q (ORCPT + 27 others); Tue, 6 Sep 2016 09:56:46 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:56581 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756272AbcIFN4n (ORCPT ); Tue, 6 Sep 2016 09:56:43 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LbDic-1bE0ew2cwM-00kz8Y; Tue, 06 Sep 2016 15:56:16 +0200 From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] ARM: common/locomo: remove NO_IRQ check Date: Tue, 6 Sep 2016 15:53:28 +0200 Message-Id: <20160906135637.2622666-2-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:FDUqvcYbb3a8xsCKrYgZc8wpIyVEzKmCPZIc+ioWaAG208LzruS Awpvnheqgp9X+pOZ5dDz1AIA+ReO+l6jJS02nJLca0qNXYj++/3x4nvC5e8qv8BOCN3hezd u9nn11dELXO78bcNxFTXlB3LQq9Bab7SGyZUeaYAY/5W+sLiJfO9vykKucidVj9pDAblBKo 3JibvUZNCSSGwZVuhJahw== X-UI-Out-Filterresults: notjunk:1; V01:K0:2YVlj6ofgo8=:49ZGaQq3FqAPIWRQAxzCCt JMz7HqJm3BwBW6tUlRJGdqqh4CybkgxcXDwsJtY9zrJpKuPZ02TABYKvR7bAiRuDq9LJmSDDe Uqm3jKpez2gLD7mQx1i15WnfFC5BQO/RhT2pp/7TjsFvC+K7mAwQKDs1LLSy6QB+rD8tJRyLx AipzXyYu0ii+yB7CMM8yjG9/kTECnX06yEMiHzhvcmpgehNocvdSZJPCiyzgor/AL9UH3Z5is Mz2oI9vIqS9YYd+QciwwAHRzn+Io6RtRwLTt3+2HYs1BWdXCq5AHMiCOJCGYzaPSN8iIX7nqx +PurYadsgGJ6U9ftkDILbgzSHtTcp99Plum2dnOzN1uaKeagWtLDRomQADPe5ewVMot1F6X1X IiA7XjXmhJOzG+Lg1ujCXGzSxsu684q5Qycpk+sEuK9yD4KSe0bQnPewnehgsbBnsgzDbisi4 q8/xcVWmWdZgQcQNI8DdCm2/QOGGn7LtcT3SdoWk3SMJ5v+mSULrADrn837S1PZwPWgh/KkUP wGKXOza67KExYf90z/kY94ewkdy/OB9DiZb/QzP5yPsYxYwR9dbU5rtFk0j/+4m+Bqt9iy/Hr XkFWpFI8RLDC4SCHGPlSMo7J/Zg8sgHqEgB7IcKu0Fiic8GibVJHCPo3BITz9qwlef9fTtnpV ij+qoXqC48WsvzYLYRxnMQRC6hrwNiVjvF8K5pSma6KyriXEkyxXxKxoep7PVPEHlyC8= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 489447380a29 ("[PATCH] handle errors returned by platform_get_irq*()") ten years ago, the locomo driver refuses to work without an interrupt line passed in its resources, so the check for NO_IRQ is unnecessary. We still check the irq_base argument for NO_IRQ, but as both platforms that use locomo (poodle and collie) provide both 'irq' and 'irq_base', this can be done more consistently by just checking that both are valid in the probe function and otherwise returning an error. Signed-off-by: Arnd Bergmann --- arch/arm/common/locomo.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) -- 2.9.0 diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 0e97b4b871f9..81abb04e5254 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -253,8 +253,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) dev->mapbase = 0; dev->length = info->length; - dev->irq[0] = (lchip->irq_base == NO_IRQ) ? - NO_IRQ : lchip->irq_base + info->irq[0]; + dev->irq[0] = lchip->irq_base + info->irq[0]; ret = device_register(&dev->dev); if (ret) { @@ -376,6 +375,9 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) unsigned long r; int i, ret = -ENODEV; + if (!pdata->irq_base) + return ret; + lchip = kzalloc(sizeof(struct locomo), GFP_KERNEL); if (!lchip) return -ENOMEM; @@ -387,7 +389,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) lchip->phys = mem->start; lchip->irq = irq; - lchip->irq_base = (pdata) ? pdata->irq_base : NO_IRQ; + lchip->irq_base = pdata->irq_base; /* * Map the whole region. This also maps the @@ -454,8 +456,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) * The interrupt controller must be initialised before any * other device to ensure that the interrupts are available. */ - if (lchip->irq != NO_IRQ && lchip->irq_base != NO_IRQ) - locomo_setup_irq(lchip); + locomo_setup_irq(lchip); for (i = 0; i < ARRAY_SIZE(locomo_devices); i++) locomo_init_one_child(lchip, &locomo_devices[i]); @@ -476,9 +477,7 @@ static void __locomo_remove(struct locomo *lchip) { device_for_each_child(lchip->dev, NULL, locomo_remove_child); - if (lchip->irq != NO_IRQ) { - irq_set_chained_handler_and_data(lchip->irq, NULL, NULL); - } + irq_set_chained_handler_and_data(lchip->irq, NULL, NULL); iounmap(lchip->base); kfree(lchip); 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; From patchwork Tue Sep 6 13:53:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101846 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp562605qgf; Tue, 6 Sep 2016 06:57:22 -0700 (PDT) X-Received: by 10.98.144.144 with SMTP id q16mr72810535pfk.98.1473170242700; Tue, 06 Sep 2016 06:57:22 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si35543283paf.87.2016.09.06.06.57.22; Tue, 06 Sep 2016 06:57:22 -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 S1756403AbcIFN5U (ORCPT + 27 others); Tue, 6 Sep 2016 09:57:20 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:57680 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754815AbcIFN5R (ORCPT ); Tue, 6 Sep 2016 09:57:17 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MJsSS-1bgAw71I3A-001DfU; Tue, 06 Sep 2016 15:56:47 +0200 From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , linux-pcmcia@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] pcmcia: soc-common: remove incorrect NO_IRQ use Date: Tue, 6 Sep 2016 15:53:30 +0200 Message-Id: <20160906135637.2622666-4-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:nvAhMPB8SSmEsAjLJgmhi7ol3f8HQPKDjRXw8Gb0DmLmrgfbsGB sDyJAC2iKlnMLcl/Rb0JNrw0Pm0guh26v1/miPLlLm8ULkJgTvH4Yoe4SZfAQwRpLIDpx4J HHyirYkQrYDK4RzFjlM7YZAoZ2hXOjBU0y4J6O+WyIHdVECA46TVcO85YBraPN6chMWa0fL TIyZ9WAXMpS0vhfjbIJaw== X-UI-Out-Filterresults: notjunk:1; V01:K0:MC0ag/xwpQk=:Lu5EOf8VddcsEJ1O4iaawW xVcWjhaFS9dM6HC1A7ewC4LgT1yHObmcLRRJnt/lW2CM3zebkigkQdwXIBPO4U1+QudwmRrcI KY9amuoPFZvgSbMcZilZXml0tCNhkjrKEoNB24sIkYX0QPeo82O6nUFJSn4GJ+Sr08wI9/wB1 BSARWtnKDBaTI23tY3pvA1N3HLNFIBX/kCh0H0ic7cHQPReNcS0gemmJf13PIJdTjQvqydjsK h7Frmx+Ba6ZBjw4dPLYlXl6VZlU197kSUNWsFgjYZPBZLCuiE+KO7P0fRg3NxluQlfYrMVC3K KZXJlbV8q7md0yuYG1n/uhlS1G3J/PGxYd1ocQba2//iqsfhHLIRfcTfjqpS+r6CmU/B+MES4 yZLjVk1+/5NB2jFbOp02XC+hF0MssLWt+Uh5F4Jtp+3LRjb2/A8p8ufAahGSEQfHm2B4S5iMo sjIDhYVVIiuzwOzzl6tNXkfs8XMPPGm5CWHXw1OIFlKukI4RggC72icLMpokdgc1Cg/TXyz60 MWIqmA6xkzHUO7C1TArR89c0kTqkqQwty7Adh8yNg4gM6pPKtIAulxqIgUNxuRJpdqgTL88nq Mr3DIMl4CU8NVZI02stlNZ5GJHqvDK7o6PtMmDWtVB1qfDRy6bsqs6tMeLpJt6pnHefLedyzG a2VBqzasR6JUDXqkkenveHBXNPmQY/WY9K4FcMdl/PLmAYP/xwVhtgamXz0v+34BvOxc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The soc_common driver (used on ARM sa1100 and pxa) initializes the socket->pci_irq member to NO_IRQ by default to signify an invalid interrupt, and normally overrides this with a proper interrupt later. However, the code that checks socked->pci_irq for validity compares it to zero instead of NO_IRQ, as most drivers do, so this cannot work right. While zero is a valid interrupt number on PXA (and in the past also on sa1100), it is the interrupt line for the 'ssp' serial port, so there is no possible conflict in practice and we can simply change the default to zero. Signed-off-by: Arnd Bergmann --- drivers/pcmcia/soc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index eed5e9c05353..339ce29fa97b 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -691,7 +691,7 @@ void soc_pcmcia_init_one(struct soc_pcmcia_socket *skt, skt->ops = ops; skt->socket.owner = ops->owner; skt->socket.dev.parent = dev; - skt->socket.pci_irq = NO_IRQ; + skt->socket.pci_irq = 0; for (i = 0; i < ARRAY_SIZE(skt->stat); i++) skt->stat[i].gpio = -EINVAL;