]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: das800: tidy up das800_interrupt()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 23 Apr 2013 01:37:29 +0000 (18:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Apr 2013 17:41:51 +0000 (10:41 -0700)
commit4db0cfa5d9cb9c745c34bc685c28c86398863ea3
tree0e6212081e42c5138f85e46cc6d800103454d1d3
parent28ad64fdd69fe63b3875be8ad54b6ffe2cbdca19
staging: comedi: das800: tidy up das800_interrupt()

Rename the CamelCase variable 'dataPoint'.

Cleanup some of the comments and fix the > 80 char lines.

Use the das800_ai_get_sample() helper to get the analog input data.

Change the fifo flags into bools and make sure to check for the
fifo overflow while reading the samples. This also fixes the overflow
detection for 12-bit resolutions. In the current code the 'dataPoint'
value has been shifted and masked. This could result in fifo_overflow
being invalidly true.

Remove the need for the 'thisboard' pointer by using the subdevice
'maxdata' to determine the sample size.

The devpriv->forever flag is really a bool. Treat it as such.

Remove the comedi_error() messages. The user will get the error
condition back in the async event. The message is just added noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das800.c