From: H Hartley Sweeten Date: Thu, 17 Apr 2014 17:07:51 +0000 (-0700) Subject: staging: comedi: hwdrv_apci3200: properly validata the ai cmd->start_arg X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~36^2~1335 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b799edccbfb8c8973e8b55e8a0bfdc70c707f21;p=pandora-kernel.git 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed