staging: comedi: addi_apci_2032: interrupt safety change
authorIan Abbott <abbotti@mev.co.uk>
Mon, 3 Dec 2012 18:15:40 +0000 (18:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 22:10:01 +0000 (14:10 -0800)
commit0774c2b5c1e0025cb016393d8552171c0ec55c39
tree040be88b5ec40da187006dac55fbf2704bda3c76
parentd9f5420268ca9b2bbe62f14757fac3e10eaf1ebf
staging: comedi: addi_apci_2032: interrupt safety change

Put the hardware into a safe state before enabling the interrupt.  In
the interrupt routine, check the device has been fully configured by
checking `dev->attached`.  In particular, `dev->read_subdev` could be
NULL early on and although the hardware's status register should
indicate no interrupt has occurred (since it's been put into a safe
state), it's better not to rely on it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_2032.c