diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-02-10 11:49:38 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-14 09:28:46 -0800 |
| commit | d8644e418b2613b3eaf1e10fe6fd0d84018c2f8a (patch) | |
| tree | cdf567fa08b1535ae7f9c5716bbefda1b9f73da5 /include/linux | |
| parent | 45b281e457dc5e80650ca6808fb08df49b677f03 (diff) | |
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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
