Re: [PATCH] staging: comedi: adl_pci9111: use comedi_async 'scans_done' to detect EOA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/11/14 00:28, H Hartley Sweeten wrote:
The comedi core now counts the number of samples added to the async buffer and
detects the end-of-scan and increments the comedi_async 'scans_done' counter.

Remove the private data member 'stop_counter' and use the 'scans_done' member
to detect the end-of-acquisition.

This fixes a possible interger overflow when calculating the value of the
'stop_counter' and removes the need to accumulate the 'total' number of
samples added to the async buffer in pci9111_handle_fifo_half_full().

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
  drivers/staging/comedi/drivers/adl_pci9111.c | 28 ++++------------------------
  1 file changed, 4 insertions(+), 24 deletions(-)

Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux