[PATCH v2 2/3] staging: comedi: drivers: move comedi_async 'cur_chan' tracking into the core

Ian Abbott abbotti at mev.co.uk
Fri Oct 31 17:28:22 UTC 2014


On 31/10/14 16:49, H Hartley Sweeten wrote:
> The commedi_async 'cur_chan' member is used to track the current position
> in the chanlist for a scan. Currently only a couple comedi drivers use
> this member.
>
> For aeshtetics, move the 'cur_chan' tracking into the core for non-SDF_PACKED
> subdevices. The 'cur_chan' will be updated after reading or writing samples
> to the async buffer by comedi_inc_scan_progress(). All non-SDF_PACKED subdevices
> will then automatiaclly track the 'cur_chan'.
>
> Some of the drivers use the 'cur_chan' to detect the end of scan event when
> counting scans. The COMEDI_CB_EOS event is automatically added by the core
> when the end of scan is detected. The drivers just need to check if the
> 'cur_chan' is 0 to count the number of scans completed.
>
> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> ---
>   drivers/staging/comedi/drivers.c                          |  7 +++++++
>   drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c |  2 --
>   drivers/staging/comedi/drivers/adl_pci9118.c              |  8 ++------
>   drivers/staging/comedi/drivers/adv_pci1710.c              | 11 +----------
>   drivers/staging/comedi/drivers/ni_mio_common.c            |  8 --------
>   drivers/staging/comedi/drivers/pcl812.c                   | 13 ++++---------
>   drivers/staging/comedi/drivers/pcl816.c                   |  6 +-----
>   drivers/staging/comedi/drivers/pcl818.c                   |  6 +-----
>   drivers/staging/comedi/drivers/rtd520.c                   |  3 ---
>   9 files changed, 16 insertions(+), 48 deletions(-)

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list