Skip to content

Commit

Permalink
[PATCH] yenta: optimize interrupt handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dr-itz authored and Dominik Brodowski committed Jan 5, 2006
1 parent 37f7795 commit e411580
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pcmcia/yenta_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down

0 comments on commit e411580

Please sign in to comment.