linux_old1/drivers/staging
Ian Abbott 73e0e4dfed staging: comedi: comedi_test: fix timer lock-up
Commit 2405124744 ("staging: comedi: comedi_test: use
comedi_handle_events()") resulted in the timer routine
`waveform_ai_interrupt()` calling `comedi_handle_events()` instead of
`comedi_events()`.  That had the advantage of automatically stopping the
acquisition on overflow/error/end-of-acquisition conditions (by calling
the comedi subdevice's "cancel" handler), but currently results in the
timer routine locking when one of those conditions occur.  This is
because the "cancel" handler `waveform_ai_cancel()` calls
`del_timer_sync()`.

Fix it by adding a bit to the device private data that indicates whether
the acquisition is active or not, and changing the "cancel" handler to
use `del_timer()` instead of `del_timer_sync()`.  The bit is set when
starting the acquisition, cleared when ending the acquisition (in the
"cancel" handler), and tested in the timer routine, which will do
nothing if the acquisition is inactive.  Also, make sure any scheduled
timeout event gets cancelled when the low-level device gets "detached"
from the comedi core by calling `del_timer_sync()` in the "detach"
handler `waveform_detach()`.

Fixes: 2405124744 ("staging: comedi: comedi_test: use comedi_handle_events()")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:15:07 +08:00
..
android staging: android: Replace timeval with timespec64 2014-10-28 16:15:03 +08:00
board
clocking-wizard staging: Add Xilinx Clocking Wizard driver 2014-10-20 10:29:26 +08:00
comedi staging: comedi: comedi_test: fix timer lock-up 2014-10-29 16:15:07 +08:00
cptm1217
dgap staging: dgap: Use unsigned for loop index 2014-10-28 16:19:02 +08:00
dgnc staging: dgnc: dgnc_kcompat.h: remove unused macro 2014-10-28 16:12:39 +08:00
emxx_udc staging: emxx_udc: Remove null check before kfree 2014-10-23 13:43:46 +08:00
ft1000 staging: ft1000: Remove curly braces for single statement blocks 2014-10-28 16:53:09 +08:00
fwserial
gdm72xx staging: gdm72xx: Removed unnecesarry out of memory usage 2014-10-20 10:29:18 +08:00
gdm724x staging: gdm724x: Fix incorrect type in assignment 2014-10-20 10:29:18 +08:00
goldfish staging: goldfish: avoid multiple assignments 2014-09-06 21:54:57 -07:00
gs_fpgaboot staging: gs_fpgaboot: Fix "out of memory" error handling 2014-10-20 10:30:13 +08:00
iio Staging: iio: light: Removed unnecessary parentheses 2014-10-28 15:58:12 +08:00
imx-drm drivers: staging: imx-drm driver cleanup 2014-10-20 10:30:13 +08:00
line6 staging: line6: fix midibuf.c coding style issue 2014-09-23 23:41:25 -07:00
lustre Staging: lustre: libcfs_cpu: Fix ERROR: do not initialise globals to 0 or NULL 2014-10-29 15:39:55 +08:00
media Staging: media: dm365_isif: Add blank line after variable declarations 2014-10-29 15:39:55 +08:00
mt29f_spinand staging/mt29f_spinand: coding style fixes 2014-08-16 12:23:27 -07:00
netlogic staging: netlogic: fix checkpatch.pl "LINE_SPACING" issuses 2014-09-08 14:02:13 -07:00
nvec
octeon Staging: octeon: ethernet-tx: fixed coding style warnings, missing blank lines 2014-10-20 10:29:27 +08:00
octeon-usb staging: octeon-usb: fix checkpatch.pl warnings 2014-10-20 10:29:27 +08:00
olpc_dcon
ozwpan staging: ozwpan: Fix incorrect type in assignments 2014-10-28 16:19:02 +08:00
panel
rtl8188eu staging: rtl8188eu: core: Remove redundant memset before memcpy 2014-10-28 15:41:42 +08:00
rtl8192e staging: rtl8192e: delete successive assignments to the same location 2014-10-28 15:53:25 +08:00
rtl8192u Staging: rtl8192u: Annotate association types with proper endianness 2014-10-28 15:53:26 +08:00
rtl8712 staging: rtl8712: Fix unnecessary parentheses style warning in rtl871x_xmit.c 2014-10-20 10:29:28 +08:00
rtl8723au Staging: rtl8723au: rtw_cmd: Fix space prohibited between function name and open parenthesis 2014-10-29 15:39:55 +08:00
rts5208 Staging: rts5028: rtsx_transport.c: fixed a brace coding style issue. 2014-10-28 15:58:18 +08:00
skein staging: skein: File Reorg 2014-10-20 11:27:52 +08:00
slicoss Staging: slicoss: Removed unnecessary parentheses 2014-10-28 15:58:17 +08:00
speakup staging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.c 2014-10-20 10:29:19 +08:00
ste_rmi4 Staging: ste_rmi4: add new line after declarations 2014-09-23 13:44:11 -07:00
unisys staging: unisys: visorchannel: Improved cleanup code 2014-10-28 15:41:43 +08:00
vme Staging: vme: devices: Use kasprintf 2014-10-27 10:33:05 +08:00
vt6655 staging: vt6655: iwctl.c: Comments fixes 2014-10-28 16:11:14 +08:00
vt6656 staging: vt6656: remove unnecessary 'out of memory' message 2014-10-20 10:29:17 +08:00
wlan-ng staging: wlan-ng: Fix incorrect type in assignments 2014-10-28 15:41:43 +08:00
xgifb staging: remove unneeded parentheses around the right hand side of an assignment 2014-10-27 10:33:06 +08:00
Kconfig staging: bcm: remove driver 2014-10-20 10:30:15 +08:00
Makefile staging: bcm: remove driver 2014-10-20 10:30:15 +08:00
staging.c