Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9b799edc authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: hwdrv_apci3200: properly validata the ai cmd->start_arg



The async command 'arguments' should be trivially validated in Step 3 of
the (*do_cmdtest) not Step 2b. Move the validataion in this driver to the
proper place.

This driver supports two cmd->start_src values, TRIG_NOW and TRIG_EXT.
TRIG_NOW sources should always have an arg of 0. The arg for TRIG_EXT
sources is driver specific.

Properly validate the cmd->start_arg based on the cmd->start_src. Remove
the noise when the arg is invalid and modify the cmd->start_arg so that
a valid value is returned to the user.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e1d1f33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment