da0ad1bdc6
commit f53641a6e849034a44bf80f50245a75d7a376025 upstream.
The comedi_test devices have a couple of timers (ai_timer and ao_timer)
that can be started to simulate hardware interrupts. Their expiry
functions normally reschedule the timer. The driver code calls either
del_timer_sync() or del_timer() to delete the timers from the queue, but
does not currently prevent the timers from rescheduling themselves so
synchronized deletion may be ineffective.
Add a couple of boolean members (one for each timer: ai_timer_enable and
ao_timer_enable) to the device private data structure to indicate
whether the timers are allowed to reschedule themselves. Set the member
to true when adding the timer to the queue, and to false when deleting
the timer from the queue in the waveform_ai_cancel() and
waveform_ao_cancel() functions.
The del_timer_sync() function is also called from the waveform_detach()
function, but the timer enable members will already be set to false when
that function is called, so no change is needed there.
Fixes:
|
||
---|---|---|
.. | ||
drivers | ||
kcomedilib | ||
Kconfig | ||
Makefile | ||
TODO | ||
comedi.h | ||
comedi_buf.c | ||
comedi_fops.c | ||
comedi_internal.h | ||
comedi_pci.c | ||
comedi_pci.h | ||
comedi_pcmcia.c | ||
comedi_pcmcia.h | ||
comedi_usb.c | ||
comedi_usb.h | ||
comedidev.h | ||
comedilib.h | ||
drivers.c | ||
proc.c | ||
range.c |