linux/drivers/staging/comedi
H Hartley Sweeten d8644e418b staging: comedi: dt282x: use comedi_timeout()
The wait_for() macro in this driver is a bit nasty. It effects control flow
which according to the CodingStyle is a _very_ bad idea.

The mux_busy() and ad_done() macros are also bad since they rely on a local
variable having a specific name.

Remove these macros and use comedi_timeout() to wait for the analog input
mux busy completion and end-of-conversion. Both of these are detected by
reading the same register and testing different bits. Pass the bits to test
as the 'context' to the callback function.

The dt282x_ai_cmd() function also checks for the mux busy completion. The
'insn' is not available here but passing NULL is safe because nothing
uses it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14 09:28:46 -08:00
..
drivers staging: comedi: dt282x: use comedi_timeout() 2014-02-14 09:28:46 -08:00
kcomedilib staging: comedi: remove comedi_debug module parameter 2013-11-25 11:50:53 -08:00
comedi_buf.c staging: comedi: protect buffer from being freed while mmapped 2013-11-11 16:16:45 -08:00
comedi_compat32.c file->f_op is never NULL... 2013-10-24 23:34:54 -04:00
comedi_compat32.h
comedi_fops.c Staging: comedi: Correct a few printf format codes 2014-02-12 09:32:17 -08:00
comedi_internal.h staging: comedi: protect buffer from being freed while mmapped 2013-11-11 16:16:45 -08:00
comedi_pci.c
comedi_pcmcia.c
comedi_usb.c
comedi.h
comedidev.h staging: comedi: introduce comedi_timeout() 2014-02-14 09:28:43 -08:00
comedilib.h staging: comedi: comedi_bond: handle base channel for insn_bits 2013-08-26 06:41:56 -07:00
drivers.c staging: comedi: introduce comedi_timeout() 2014-02-14 09:28:43 -08:00
Kconfig comedi: Humusoft MF634 and MF624 DAQ cards driver 2014-01-13 15:03:12 -08:00
Makefile staging: comedi: remove comedi_debug module parameter 2013-11-25 11:50:53 -08:00
proc.c staging: comedi: use refcount while reading /proc/comedi 2013-11-11 16:16:44 -08:00
range.c staging: comedi: range: remove use of DPRINTK 2013-11-25 11:50:53 -08:00
TODO