staging: comedi: amplc_pci224: fix the ao cmd->start_arg use
staging: comedi: amplc_pci224: fix the ao cmd->start_arg use

This driver supports two cmd->start_src values, TRIG_INT and TRIG_EXT. For
TRIG_INT sources, the cmd->start_arg is actually the valid trig_num that is
passed to the async (*inttrig) callback. This driver trivially validates the
arg for this source to be 0.

Refactor the (*inttrig) so that the cmd->start_arg is used to check the trig_num
instead of the open coded value.

For aesthetics, refactor the (*do_cmd) to use if/else instead of the switch when
handling the cmd->start_src. All code paths do the spin lock/unlock so move those
out of the if/else.

Signed-off-by: H Hartley Sweeten <382ff55d8e07d1082d179e669636cd1552da4f36@visionengravers.com>
Reviewed-by: Ian Abbott <9e6ba6483b6a3e14d61f7c987e72ecb5b46122d6@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs