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;