[PATCH 00/55] staging: comedi: clean up writing data to the async buffer

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

 



Currently there are 5 exported methods to add sample data to the async buffer.

  1) cfc_write_long_to_buffer() - a wrapper around comedi_write_array_to_buffer()
     to add a single unsigned int size sample
  2) cfc_write_to_buffer() - a wrapper aropund comedi_write_array_to_buffer() to
     add a single unsigned short size sample
  3) cfc_write_array_to_buffer() - a wrapper aropund comedi_write_array_to_buffer()
  4) comedi_write_array_to_buffer() - adds multiple samples
  5) comedi_buf_put() - adds a single unsigned short sample

Introduce a new generic helper function, comedi_buf_write_samples(), to add
samples to the async buffer. Use this function to replace the five "write"
methods above.

H Hartley Sweeten (55):
  staging: comedi: comedi_buf: introduce comedi_buf_write_samples()
  staging: comedi: comedi_fc.h: remove cfc_write_long_to_buffer()
  staging: comedi: comedi_test: use comedi_buf_write_samples()
  staging: comedi: das800: use comedi_buf_write_samples()
  staging: comedi: ni_at_a2150: use comedi_buf_write_samples()
  staging: comedi: s626: use comedi_buf_write_samples()
  staging: comedi: ni_labpc_common: use comedi_buf_write_samples()
  staging: comedi: ni_labpc_isadma: use comedi_buf_write_samples()
  staging: comedi: das1800: use comedi_buf_write_samples()
  staging: comedi: cb_pcidas: use comedi_buf_write_samples()
  staging: comedi: adl_pci9118: use comedi_buf_write_samples()
  staging: comedi: cb_pcidas64: use comedi_buf_write_samples()
  staging: comedi: ni_mio_common: use comedi_buf_write_samples()
  staging: comedi: comedi_fc.h: remove cfc_write_to_buffer()
  staging: comedi: adl_pci9111: use comedi_buf_write_samples()
  staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()
  staging: comedi: das16m1: use comedi_buf_write_samples()
  staging: comedi: das16: use comedi_buf_write_samples()
  staging: comedi: dt282x: use comedi_buf_write_samples()
  staging: comedi: gsc_hpdi: use comedi_buf_write_samples()
  staging: comedi: usbduxsigma: use comedi_buf_write_samples()
  staging: comedi: usbduxfast: use comedi_buf_write_samples()
  staging: comedi: comedi_fc.h: remove cfc_write_array_to_buffer()
  staging: comedi: addi_apci_1032: use comedi_buf_write_samples()
  staging: comedi: addi_apci_1564: use comedi_buf_write_samples()
  staging: comedi: addi_apci_3xxx: use comedi_buf_write_samples()
  staging: comedi: adv_pci1710: use comedi_buf_write_samples()
  staging: comedi: amplc_pc236_common: use comedi_buf_write_samples()
  staging: comedi: amplc_pci230: use comedi_buf_write_samples()
  staging: comedi: comedi_parport: use comedi_buf_write_samples()
  staging: comedi: dmm32at: use comedi_buf_write_samples()
  staging: comedi: dt3000: use comedi_buf_write_samples()
  staging: comedi: me4000: use comedi_buf_write_samples()
  staging: comedi: ni_6527: use comedi_buf_write_samples()
  staging: comedi: ni_65xx: use comedi_buf_write_samples()
  staging: comedi: ni_atmio16d: use comedi_buf_write_samples()
  staging: comedi: pcl711: use comedi_buf_write_samples()
  staging: comedi: pcl726: use comedi_buf_write_samples()
  staging: comedi: pcl812: use comedi_buf_write_samples()
  staging: comedi: pcl816: use comedi_buf_write_samples()
  staging: comedi: pcl818: use comedi_buf_write_samples()
  staging: comedi: quatech_daqp_cs: use comedi_buf_write_samples()
  staging: comedi: rtd520: use comedi_buf_write_samples()
  staging: comedi: usbdux: use comedi_buf_write_samples()
  staging: comedi: hwdrv_apci3120: use comedi_buf_write_samples()
  staging: comedi: drivers: handle SDF_PACKED in comedi_inc_scan_progress()
  staging: comedi: addi_apci_2032: use comedi_buf_write_samples()
  staging: comedi: amplc_dio200_common: use comedi_buf_write_samples()
  staging: comedi: ni_pcidio: use comedi_buf_write_samples()
  staging: comedi: pcmmio: use comedi_buf_write_samples()
  staging: comedi: pcmuio: use comedi_buf_write_samples()
  staging: comedi: comedi_buf: remove comedi_buf_put()
  staging: comedi: comedi_buf: don't export comedi_write_array_to_buffer()
  staging: comedi: comedi_buf: absorb comedi_write_array_to_buffer()
  staging: comedi: comedi_buf: absorb __comedi_buf_write_alloc()

 drivers/staging/comedi/comedi_buf.c                | 76 ++++++++--------------
 drivers/staging/comedi/comedidev.h                 |  7 +-
 drivers/staging/comedi/drivers.c                   | 19 ++++--
 .../comedi/drivers/addi-data/hwdrv_apci3120.c      | 19 ++----
 drivers/staging/comedi/drivers/addi_apci_1032.c    |  3 +-
 drivers/staging/comedi/drivers/addi_apci_1564.c    |  3 +-
 drivers/staging/comedi/drivers/addi_apci_2032.c    |  7 +-
 drivers/staging/comedi/drivers/addi_apci_3xxx.c    |  2 +-
 drivers/staging/comedi/drivers/adl_pci9111.c       |  9 ++-
 drivers/staging/comedi/drivers/adl_pci9118.c       | 19 ++----
 drivers/staging/comedi/drivers/adv_pci1710.c       |  6 +-
 .../staging/comedi/drivers/amplc_dio200_common.c   | 12 +---
 .../staging/comedi/drivers/amplc_pc236_common.c    |  3 +-
 drivers/staging/comedi/drivers/amplc_pci230.c      | 14 ++--
 drivers/staging/comedi/drivers/cb_pcidas.c         |  8 ++-
 drivers/staging/comedi/drivers/cb_pcidas64.c       | 22 ++++---
 drivers/staging/comedi/drivers/comedi_fc.h         | 19 ------
 drivers/staging/comedi/drivers/comedi_parport.c    |  5 +-
 drivers/staging/comedi/drivers/comedi_test.c       |  2 +-
 drivers/staging/comedi/drivers/das16.c             |  6 +-
 drivers/staging/comedi/drivers/das16m1.c           |  3 +-
 drivers/staging/comedi/drivers/das1800.c           |  8 +--
 drivers/staging/comedi/drivers/das800.c            |  5 +-
 drivers/staging/comedi/drivers/dmm32at.c           |  2 +-
 drivers/staging/comedi/drivers/dt282x.c            | 15 ++---
 drivers/staging/comedi/drivers/dt3000.c            |  6 +-
 drivers/staging/comedi/drivers/gsc_hpdi.c          |  4 +-
 drivers/staging/comedi/drivers/me4000.c            | 16 +----
 drivers/staging/comedi/drivers/ni_6527.c           |  3 +-
 drivers/staging/comedi/drivers/ni_65xx.c           |  4 +-
 drivers/staging/comedi/drivers/ni_at_a2150.c       |  4 +-
 drivers/staging/comedi/drivers/ni_atmio16d.c       |  6 +-
 drivers/staging/comedi/drivers/ni_labpc_common.c   |  2 +-
 drivers/staging/comedi/drivers/ni_labpc_isadma.c   |  7 +-
 drivers/staging/comedi/drivers/ni_mio_common.c     | 63 +++++++++---------
 drivers/staging/comedi/drivers/ni_pcidio.c         | 12 +---
 drivers/staging/comedi/drivers/pcl711.c            |  6 +-
 drivers/staging/comedi/drivers/pcl726.c            |  3 +-
 drivers/staging/comedi/drivers/pcl812.c            | 10 +--
 drivers/staging/comedi/drivers/pcl816.c            |  6 +-
 drivers/staging/comedi/drivers/pcl818.c            |  8 +--
 drivers/staging/comedi/drivers/pcmmio.c            |  7 +-
 drivers/staging/comedi/drivers/pcmuio.c            |  8 +--
 drivers/staging/comedi/drivers/quatech_daqp_cs.c   |  4 +-
 drivers/staging/comedi/drivers/rtd520.c            |  2 +-
 drivers/staging/comedi/drivers/s626.c              |  3 +-
 drivers/staging/comedi/drivers/usbdux.c            |  3 +-
 drivers/staging/comedi/drivers/usbduxfast.c        |  6 +-
 drivers/staging/comedi/drivers/usbduxsigma.c       |  3 +-
 49 files changed, 192 insertions(+), 298 deletions(-)

-- 
2.0.3

_______________________________________________
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