All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Russell King <linux@armlinux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
	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	[thread overview]
Message-ID: <20160906135637.2622666-4-arnd@arndb.de> (raw)
In-Reply-To: <20160906135637.2622666-1-arnd@arndb.de>

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 <arnd@arndb.de>
---
 drivers/pcmcia/soc_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.9.0

  parent reply	other threads:[~2016-09-06 13:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 13:53 [PATCH 1/4] ARM: common/sa1111: remove NO_IRQ check Arnd Bergmann
2016-09-06 13:53 ` Arnd Bergmann
2016-09-06 13:53 ` [PATCH 2/4] ARM: common/locomo: " Arnd Bergmann
2016-09-06 13:53   ` Arnd Bergmann
2016-09-06 14:21   ` Russell King - ARM Linux
2016-09-06 14:21     ` Russell King - ARM Linux
2016-09-06 14:50     ` Arnd Bergmann
2016-09-06 14:50       ` Arnd Bergmann
2016-09-06 15:20       ` [PATCH v2] " Arnd Bergmann
2016-09-06 15:20         ` Arnd Bergmann
2016-09-06 13:53 ` [PATCH 3/4] mfd: ucb1x00: " Arnd Bergmann
2016-09-07 11:24   ` Lee Jones
2016-09-06 13:53 ` Arnd Bergmann [this message]
2016-09-06 14:14 ` [PATCH 1/4] ARM: common/sa1111: " Russell King - ARM Linux
2016-09-06 14:14   ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160906135637.2622666-4-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.