[PATCH v3 00/14] staging: comedi: cleanup asynchronous buffer functions

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

 



The functions used to interact with the asynchronous buffer currently are
located in the drivers.c source file. The only function driver.c uses is
comedi_buf_alloc().

For aesthetic reasons and to help maintainability, separate all the
asynchronous buffer functions out to a new comedi_buf.c source file.

Do a bit of cleanup of the comedi_buf_* functions to clarify them,

v3: reordered again to put questionable patches later in the series
    fixed an issue in patch 5 that removed the smp_mb barrier
    reword all the comments about the memory barriers
    added two patches to prevent exposing comedi_buf_{read,write}_n_allocated
    added patch to reorder the exported function prototypes

v2: rebased and reordered a bit based on next-20130108
    fixed a couple int/unsigned int issues pointed out by Ian Abbott


H Hartley Sweeten (14):
  staging: comedi: separate out comedi_buf_* functions
  staging: comedi: comedi_buf: factor out common code to free the async buffer
  staging: comedi: comedi_buf: factor out new buffer allocation code
  staging: comedi: comedi_buf: rename comedi_reset_async_buf()
  staging: comedi: comedi_buf: factor out common comedi_buf_write_alloc_* code
  staging: comedi: comedi_buf: remove comedi_buf_write_alloc_strict
  staging: comedi: comedi_buf: cleanup comedi_buf_munge()
  staging: comedi: comedi_buf: clarify comedi_buf_write_free()
  staging: comedi: comedi_buf: cleanup comedi_buf_read_n_available()
  staging: comedi: comedi_buf: clarify comedi_buf_read_alloc()
  staging: comedi: comedi_buf: clarify comedi_buf_read_free()
  staging: comedi: comedi_buf: don't expose comedi_buf_read_n_allocated()
  staging: comedi: comedi_buf: don't expose comedi_buf_write_n_allocated()
  staging: comedi: comedi_buf: reorder exported function prototypes

 drivers/staging/comedi/Makefile          |   3 +-
 drivers/staging/comedi/comedi_buf.c      | 427 +++++++++++++++++++++++++++++++
 drivers/staging/comedi/comedi_fops.c     |   4 +-
 drivers/staging/comedi/comedi_internal.h |   4 +-
 drivers/staging/comedi/comedidev.h       |  31 +--
 drivers/staging/comedi/drivers.c         | 398 ----------------------------
 6 files changed, 444 insertions(+), 423 deletions(-)
 create mode 100644 drivers/staging/comedi/comedi_buf.c

-- 
1.8.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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