diff options
author | Daniel Ritz <daniel.ritz@gmx.ch> | 2005-09-20 17:17:37 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 17:41:00 -0500 |
commit | e4115805cf2020da94e8bd1296243605cda487ff (patch) | |
tree | 0362f93813f4a90e0c241c5e49e04207feb985ee /drivers/pcmcia/yenta_socket.c | |
parent | 37f779554404ddca981ac4b4cc6692fc09b71e96 (diff) |
[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/yenta_socket.c')
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 8 |
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) | |||
531 | 531 | ||
532 | csc = exca_readb(socket, I365_CSC); | 532 | csc = exca_readb(socket, I365_CSC); |
533 | 533 | ||
534 | if (!(cb_event || csc)) | ||
535 | return IRQ_NONE; | ||
536 | |||
534 | events = (cb_event & (CB_CD1EVENT | CB_CD2EVENT)) ? SS_DETECT : 0 ; | 537 | events = (cb_event & (CB_CD1EVENT | CB_CD2EVENT)) ? SS_DETECT : 0 ; |
535 | events |= (csc & I365_CSC_DETECT) ? SS_DETECT : 0; | 538 | events |= (csc & I365_CSC_DETECT) ? SS_DETECT : 0; |
536 | if (exca_readb(socket, I365_INTCTL) & I365_PC_IOCARD) { | 539 | 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) | |||
544 | if (events) | 547 | if (events) |
545 | pcmcia_parse_events(&socket->socket, events); | 548 | pcmcia_parse_events(&socket->socket, events); |
546 | 549 | ||
547 | if (cb_event || csc) | 550 | return IRQ_HANDLED; |
548 | return IRQ_HANDLED; | ||
549 | |||
550 | return IRQ_NONE; | ||
551 | } | 551 | } |
552 | 552 | ||
553 | static void yenta_interrupt_wrapper(unsigned long data) | 553 | static void yenta_interrupt_wrapper(unsigned long data) |