From db702b7858abd08ecd99bec1544eb519801330aa Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 4 Mar 2014 11:29:36 -0700 Subject: [PATCH] staging: comedi: pcl812: factor out the common "next ai chan" code The DMA and EOC interrupt handlers all have common code that bumps the counters in the private data that keep track of what channel is being sampled next and when all the data has been sampled. Factor this common code into a helper function. Don't clear the events in the driver. The comedi core will clear the events at the end of the comedi_event(). Make sure the COMEDI_CB_BLOCK event is set when advancing to the next channel so that when the comedi_event() is finally called the core will wake the async_queue to return the analog input data. Also, make sure the COMEDI_CB_EOS event is set at the completion of each scan. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed