Currently there are 3 exported methods to read sample data from the async buffer.
1) cfc_read_array_from_buffer() - a wrapper around comedi_read_array_from_buffer() 2) comedi_read_array_from_buffer() - reads multiple samples 3) comedi_buf_get() - reads a single sample In addition there are the exported functions comedi_buf_memcpy_{to,from}() that are only used internally to read/write data to/from the async buffer. Introduce a new generic helper function, comedi_buf_read_samples(), to read samples from the async buffer. Use this function to replace the three "read" methods above. Remove the exports from comedi_buf_memcpy_{to,from}() and tidy them up a bit. H Hartley Sweeten (18): staging: comedi: comedi_buf: introduce comedi_buf_read_samples() staging: comedi: amplc_pci224: use comedi_buf_read_samples() staging: comedi: cb_pcidas: introduce cb_pcidas_ao_load_fifo() staging: comedi: cb_pcidas: introduce cb_pcidas64_ao_fill_buffer() staging: comedi: dt282x: introduce dt282x_ao_setup_dma() staging: comedi: comedi_fc.h: remove cfc_read_array_from_buffer() staging: comedi: comedi_buf: remove export of comedi_read_array_from_buffer() staging: comedi: comedi_buf: absorb comedi_read_array_from_buffer() staging: comedi: comedi_buf: make comedi_buf_read_samples() work for single samples staging: comedi: ni_mio_common: use comedi_buf_read_samples() staging: comedi: amplc_pci230: use comedi_buf_read_samples() staging: comedi: usbdux: use comedi_buf_read_samples() staging: comedi: usbduxsigma: use comedi_buf_read_samples() staging: comedi: comedi_buf: remove comedi_buf_get() staging: comedi: comedi_buf: dont't export comedi_buf_memcpy_from() staging: comedi: comedi_buf: don't export comedi_buf_memcpy_to() staging: comedi: comedi_buf: comedi_buf_memcpy_to() remove 'offset' param staging: comedi: comedi_buf: comedi_buf_memcpy_from() remove 'offset' param drivers/staging/comedi/comedi_buf.c | 72 ++++++++++------------- drivers/staging/comedi/comedidev.h | 9 +-- drivers/staging/comedi/drivers/amplc_pci224.c | 7 +-- drivers/staging/comedi/drivers/amplc_pci230.c | 17 +++--- drivers/staging/comedi/drivers/cb_pcidas.c | 54 +++++++----------- drivers/staging/comedi/drivers/cb_pcidas64.c | 79 +++++++++++++++----------- drivers/staging/comedi/drivers/comedi_fc.h | 7 --- drivers/staging/comedi/drivers/dt282x.c | 42 +++++++------- drivers/staging/comedi/drivers/ni_mio_common.c | 13 +---- drivers/staging/comedi/drivers/usbdux.c | 3 +- drivers/staging/comedi/drivers/usbduxsigma.c | 3 +- 11 files changed, 137 insertions(+), 169 deletions(-) -- 2.0.3 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel