summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDaniel Ritz <daniel.ritz@gmx.ch>2005-09-20 14:17:37 -0700
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-05 23:41:00 +0100
commite4115805cf2020da94e8bd1296243605cda487ff (patch)
tree0362f93813f4a90e0c241c5e49e04207feb985ee /drivers/pcmcia
parent37f779554404ddca981ac4b4cc6692fc09b71e96 (diff)
downloadlinux-e4115805cf2020da94e8bd1296243605cda487ff.tar.gz
linux-e4115805cf2020da94e8bd1296243605cda487ff.tar.bz2
linux-e4115805cf2020da94e8bd1296243605cda487ff.zip
[PATCH] yenta: optimize interrupt handler
Don't waste cpu time in yenta interrupt handler when the interrupt was for another device. Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/yenta_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index ec6ab65f0872..8bfe72b71302 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -531,6 +531,9 @@ static irqreturn_t yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs)
csc = exca_readb(socket, I365_CSC);
+ if (!(cb_event || csc))
+ return IRQ_NONE;
+
events = (cb_event & (CB_CD1EVENT | CB_CD2EVENT)) ? SS_DETECT : 0 ;
events |= (csc & I365_CSC_DETECT) ? SS_DETECT : 0;
if (exca_readb(socket, I365_INTCTL) & I365_PC_IOCARD) {
@@ -544,10 +547,7 @@ static irqreturn_t yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (events)
pcmcia_parse_events(&socket->socket, events);
- if (cb_event || csc)
- return IRQ_HANDLED;
-
- return IRQ_NONE;
+ return IRQ_HANDLED;
}
static void yenta_interrupt_wrapper(unsigned long data)