]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: comedi: addi_apci_1564: clean up apci1564_interrupt()
authorChase Southwood <chase.southwood@gmail.com>
Thu, 3 Jul 2014 02:17:21 +0000 (21:17 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:24:47 +0000 (16:24 -0700)
commitb11771aa4c22074df2b804c02433c5357514f5c5
treee8d0e7c92bb627e392c6e520ca9b29b1cb719fbb
parentf89ced89d8c0d155e8d802612e3860a440d04afe
staging: comedi: addi_apci_1564: clean up apci1564_interrupt()

Remove the checks for interrupts from unknown sources.  This situation
should never occur and the checks were doing nothing to help the
situation.

Also, the portion of the function for handling counter interrupts is
reapeated four times (once for each counter), but is completely identical
save for the register is is accessing, so we can handle all four counters
with a for loop.

Finally, the interrupt handler is incorrectly setting and then checking
devpriv->timer_select_mode before processing some of the triggered
interrupts, so just remove all occurrences of this.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk.>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_1564.c