staging: comedi: ni_mio_common: split out ao arming from ni_ao_inttrig
authorSpencer E. Olson <olsonse@umich.edu>
Mon, 10 Oct 2016 14:14:19 +0000 (08:14 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:26:17 +0000 (10:26 +0200)
commit1ffe8bdc09f8bfcaad76d71ae68b623c7e03f20f
tree180af498571aabcb7de471cd169f70d19e0473a0
parentcc7a6d6c4614bbf65d57dac31706fb01377d8371
staging: comedi: ni_mio_common: split out ao arming from ni_ao_inttrig

AO device arming was previously done as a part of ni_ao_inttrig which is
called as a result of the user calling comedi_internal_trigger.  For
start_src == TRIG_EXT, this does not make very much sense since external
triggers should not conceptually need to be software triggered also.  This
patch splits out the arming functionality to allow arming to specifically
and separately be done via the CONFIG_INSN_ARM ioctl command.

In order to provide backwards compatibility, this patch also provides
automatic arming if ni_ao_inttrig is simply called.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_stc.h