]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: das16: use comedi_async 'scans_done' to detect EOA
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 26 Jan 2015 23:17:19 +0000 (16:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jan 2015 19:14:04 +0000 (11:14 -0800)
commitb706f82fd34d0aeb669e1cd9e896f777060dc0b3
tree5b414ed7f77e8042567a74124b310ab0f1df9327
parentcc5b83ded0ece019ec7c7a2b7efe211426da77a8
staging: comedi: das16: use comedi_async 'scans_done' to detect EOA

Refactor das16_interrupt() to use the comedi_async 'scans_done' member to
detect the End-of-Acquisition for the async command. Use the helper function
comedi_nsamples_left() to determine if DMA needs to be restarted.

This allows the removal of the private data 'adc_byte_count' and fixes a
possible integer overflow issue when that value is calculated.

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/das16.c