The functions used to interact with the asynchronous buffer currently are located in the drivers.c souce 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, 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 (11): staging: comedi: separate out comedi_buf_* functions staging: comedi: comedi_buf: cleanup comedi_buf_write_n_available() staging: comedi: comedi_buf: factor out common comedi_buf_write_alloc_* code staging: comedi: comedi_buf: remove comedi_buf_alloc_strict() staging: comedi: comedi_buf: rename comedi_reset_async_buf() staging: comedi: comedi_buf: factor out common code to free the async buffer staging: comedi: comedi_buf: factor out the new buffer allocation code 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() drivers/staging/comedi/Makefile | 3 +- drivers/staging/comedi/comedi_buf.c | 415 +++++++++++++++++++++++++++++++ drivers/staging/comedi/comedi_fops.c | 4 +- drivers/staging/comedi/comedi_internal.h | 3 +- drivers/staging/comedi/comedidev.h | 2 - drivers/staging/comedi/drivers.c | 398 ----------------------------- 6 files changed, 421 insertions(+), 404 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