-
- Downloads
staging: comedi: mite: introduce mite_sync_dma()
The struct mite_channel 'dir' member specifies if the dma is input or output. Wrap the mite_sync_input_dma() and mite_sync_output_dma() functions with a single mite_sync_dma() so that the drivers don't have to worry about the sync direction. The functions that actually sync the input/output dma currently return -1 if an overflow/underrun is detected otherwise they return 0. If an overflow/underrun is detected the async->event COMEDI_CB_OVERFLOW is also set. The callers never check the return value anyway so just make the functions return void. The async->event can be checked if necessary to detect any errors. Signed-off-by:H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by:
Ian Abbott <abbotti@mev.co.uk> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
- drivers/staging/comedi/drivers/mite.c 22 additions, 21 deletionsdrivers/staging/comedi/drivers/mite.c
- drivers/staging/comedi/drivers/mite.h 1 addition, 4 deletionsdrivers/staging/comedi/drivers/mite.h
- drivers/staging/comedi/drivers/ni_660x.c 1 addition, 1 deletiondrivers/staging/comedi/drivers/ni_660x.c
- drivers/staging/comedi/drivers/ni_mio_common.c 3 additions, 3 deletionsdrivers/staging/comedi/drivers/ni_mio_common.c
- drivers/staging/comedi/drivers/ni_pcidio.c 2 additions, 2 deletionsdrivers/staging/comedi/drivers/ni_pcidio.c
- drivers/staging/comedi/drivers/ni_tiocmd.c 1 addition, 1 deletiondrivers/staging/comedi/drivers/ni_tiocmd.c
Loading
Please register or sign in to comment