From f8736ca466e2014d6e8bad478fcc5e5cb0105af0 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 31 Oct 2014 09:49:31 -0700 Subject: [PATCH] staging: comedi: drivers: move comedi_async 'cur_chan' tracking into the core 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed