]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: adl_pci9118: clarify async command start
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Sep 2014 20:05:53 +0000 (13:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Sep 2014 21:34:25 +0000 (14:34 -0700)
commite7d2191b0ba09e070c1417fc8af73c3c5cd744f7
treeaf4481616f7d071189fd404faf5f035b1391aff1
parent5e17ae870c21c1860eb9dc3d911a8d2fe3d7a73e
staging: comedi: adl_pci9118: clarify async command start

The async command can start immediately (TRIG_NOW), from an internal
trigger (TRIG_INT), or from an external trigger (TRIG_EXT). Currently
the start of the command is scattered in the DMA and non-DMA helper
functions.

Consolidate the start of the async command at the end of the (*do_cmd)
function. For aesthetics, use the 'cmd->start_src' directly instead
of the 'ai12_startstop' in the private data to determine how to start
the command. This also fixes a minor bug where the external trigger
gets enabled for a start_src == TRIG_INT.

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>
drivers/staging/comedi/drivers/adl_pci9118.c