staging: comedi: pcl816: clarify 'irq_was_now_closed' flag in private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Mar 2014 18:29:44 +0000 (11:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 01:06:13 +0000 (17:06 -0800)
commitedf0f32bafd92afaffca4f086be2a49ad526dfd3
tree41f48b3b42fe2cb04afa1da52bd85d40473df2a2
parent2850b1c74ef065368827776a612cb0d873a39d8e
staging: comedi: pcl816: clarify 'irq_was_now_closed' flag in private data

This flag in the private data is set when an async command is canceled with
the ai (*cancel) operation. Rename the flag to 'ai_cmd_canceled' to clarify
its use.

Move the check for the flag in the interrupt handler. If the async command
was canceled there is no reason to handle the interrupt. Just clear interrupt
and return.

Also, make sure to clear the interrupt when the device is not attached.

Signed-off-by: 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/pcl816.c