summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-06-16 14:35:15 +0200
committerDominik Brodowski <linux@dominikbrodowski.net>2008-06-24 15:33:41 +0200
commit635416ef393e8cec5a89fc6c1de710ee9596a51e (patch)
tree2a59604e72fb7432fc462f090e5efe51fbddddff
parent05f43d48ddbda0ce74941aff4711a1829116cc4f (diff)
downloadblackbird-op-linux-635416ef393e8cec5a89fc6c1de710ee9596a51e.tar.gz
blackbird-op-linux-635416ef393e8cec5a89fc6c1de710ee9596a51e.zip
pcmcia: irq probe can be done without risking an IRQ storm
Nowdays you can ask for an IRQ to be allocated but not enabled, when PCMCIA was written this was not true and this feature is thus not used [linux@dominikbrodowski.net: add comment and ifdef to avoid compilation breakage at least on alpha] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/pcmcia/pcmcia_resource.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index c8f77b889d42..78af59415930 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -812,6 +812,15 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
type = IRQF_SHARED;
#ifdef CONFIG_PCMCIA_PROBE
+
+#ifdef IRQ_NOAUTOEN
+ /* if the underlying IRQ infrastructure allows for it, only allocate
+ * the IRQ, but do not enable it
+ */
+ if (!(req->Attributes & IRQ_HANDLE_PRESENT))
+ type |= IRQ_NOAUTOEN;
+#endif /* IRQ_NOAUTOEN */
+
if (s->irq.AssignedIRQ != 0) {
/* If the interrupt is already assigned, it must be the same */
irq = s->irq.AssignedIRQ;
OpenPOWER on IntegriCloud