提交 e4115805 编写于 作者: D Daniel Ritz 提交者: Dominik Brodowski

[PATCH] yenta: optimize interrupt handler

Don't waste cpu time in yenta interrupt handler when the interrupt was for
another device.
Signed-off-by: NDaniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 37f77955
...@@ -531,6 +531,9 @@ static irqreturn_t yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -531,6 +531,9 @@ static irqreturn_t yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs)
csc = exca_readb(socket, I365_CSC); csc = exca_readb(socket, I365_CSC);
if (!(cb_event || csc))
return IRQ_NONE;
events = (cb_event & (CB_CD1EVENT | CB_CD2EVENT)) ? SS_DETECT : 0 ; events = (cb_event & (CB_CD1EVENT | CB_CD2EVENT)) ? SS_DETECT : 0 ;
events |= (csc & I365_CSC_DETECT) ? SS_DETECT : 0; events |= (csc & I365_CSC_DETECT) ? SS_DETECT : 0;
if (exca_readb(socket, I365_INTCTL) & I365_PC_IOCARD) { 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,10 +547,7 @@ static irqreturn_t yenta_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (events) if (events)
pcmcia_parse_events(&socket->socket, events); pcmcia_parse_events(&socket->socket, events);
if (cb_event || csc)
return IRQ_HANDLED; return IRQ_HANDLED;
return IRQ_NONE;
} }
static void yenta_interrupt_wrapper(unsigned long data) static void yenta_interrupt_wrapper(unsigned long data)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册