RE: [PATCH] staging: comedi: fix scan_end_arg == chanlist_len assumption

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

 



On Wednesday, November 12, 2014 9:01 AM, Ian Abbott wrote:
> Some comedi drivers allow the `scan_end_arg` value of an asynchronous
> command to be a multiple (> 1) of the `chanlist_len` although most
> require them to be the same value.
>
> `comedi_bytes_per_scan()` is incorrectly using `chanlist_len` as the
> length of the scan.  Change it to use `scan_end_arg`.
>
> `comedi_nsamples_left()` is incorrectly using `cur_chan` as the current
> sample position in the scan (it is actually the current position in the
> channel list).  Change it to use the actual sample position in the scan.
> (Unfortunately we only have the current scan position in bytes currently,
> so convert that to a sample position.)
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---
>  drivers/staging/comedi/drivers.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>

_______________________________________________
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