linux/drivers/staging
Ian Abbott 0a43f75ef5 staging: comedi: das16: use spin-lock when setting timer
"das16" sets a timer running in `das16_cmd_exec()` and sets
`devpriv->timer_running` to indicate that it is running.  The timer
expiration routine `das16_timer_interrupt()` checks
`devpriv->timer_running` to check whether it needs to reschedule the
timer, but this is not synchronized with `das16_cmd_exec()`.  Since
`das16_cancel()` acquires the `dev->spinlock` spin-lock when clearing
`devpriv->timer_running` and removing the timer from the queue, use the
same spin-lock in `das16_cmd_exec()` and `das16_timer_interrupt()`
around the setting and checking of `devpriv->timer_running`.

Since `das16_interrupt()` (called from `das16_timer_interrupt()`) checks
whether DMA is enabled in the device while holding `dev->spinlock`, and
DMA is enabled by `das16_cmd_exec()` around the time it schedules the
timer, enable the DMA in the device while holding the spin-lock.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:29:31 -07:00
..
android staging: android: Replace timeval with timespec64 2014-10-28 16:15:03 +08:00
board staging: board: disable as it breaks the build 2014-07-10 14:47:27 -07:00
clocking-wizard staging: clocking-wizard: Contain macro argument in parenthesis 2014-10-29 17:25:53 +08:00
comedi staging: comedi: das16: use spin-lock when setting timer 2014-10-30 13:29:31 -07:00
cptm1217 staging: cptm1217: Remove useless cast on void pointer 2014-10-30 13:05:46 -07:00
dgap staging: dgap: Remove useless cast on NULL 2014-10-30 13:09:15 -07:00
dgnc staging: dgnc: Remove useless cast on void pointer 2014-10-30 13:05:46 -07:00
emxx_udc staging: emxx_udc: use USB API functions rather than constants 2014-10-30 13:20:42 -07:00
ft1000 Staging: ft1000: ft1000_hw.c: Removed some checkpatch errors and warnings. 2014-10-30 13:25:08 -07:00
fwserial
gdm72xx staging: gdm72xx: Remove useless cast on void pointer 2014-10-30 13:05:47 -07: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 a compiler warning with make W=2 2014-10-29 17:39:55 +08:00
iio staging: iio: adc: Remove useless cast on void pointer 2014-10-30 13:05:47 -07: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:lnet:selftest: remove unused function 2014-10-29 16:27:48 -07:00
media staging: media: lirc: lirc_zilog.c: remove unnecessary 'out of memory' message 2014-10-30 13:12:05 -07: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 staging/nvec: Use platform_get_irq() 2014-07-30 17:18:47 -07:00
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: Remove useless cast on void pointer 2014-10-30 13:05:48 -07:00
panel staging: panel: Use designated initializers 2014-10-29 16:28:17 -07:00
rtl8188eu staging: rtl8188eu: core: Improve cleanup code 2014-10-30 13:12:05 -07:00
rtl8192e staging, rtl8192e, LLVMLinux: Make static local in inline function const 2014-10-29 16:33:05 -07:00
rtl8192u staging: rtl8192u: Fix "space prohibited after that open parenthesis '('" errors 2014-10-29 16:48:43 +08:00
rtl8712 staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl8723au staging: rtl8723au: core: Remove useless cast on void pointer 2014-10-30 13:06:03 -07:00
rts5208 staging: rts5208: Remove useless cast on void pointer 2014-10-30 13:06:03 -07:00
skein staging: skein: skein_api.c: removed space before ',' 2014-10-29 16:20:56 -07: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: fix macro spacing in uisutils.h 2014-10-29 17:42:07 +08:00
vme Staging: vme: devices: Use kasprintf 2014-10-27 10:33:05 +08:00
vt6655 staging: vt6655: dead code remove header type.h 2014-10-29 13:34:47 -07: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: xgifb: fix space before comma 2014-10-29 16:05:16 -07: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