On 2014-09-10 00:15, H Hartley Sweeten wrote:
The validation of the cmd->stop_arg when the cmd->stop_src == TRIG_EXT
is a bit over thought. The comments state that the stop_arg is validated
to force an external trigger of 0 and allow the CR_EDGE flag, which is
ignored. In reality the stop_arg is not even used by the driver when
the stop_src is TRIG_EXT.

Simplify the validation so that the stop_arg must simply be '0' when
the stop_src is TRIG_EXT.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>

I'd say that CR_EDGE is a perfectly legal flag to use here (as the external trigger *is* edge-triggered), even if the driver allows the user not to set it. If the user code went to the trouble of setting the flag only for the driver to clear it and flag it as an errors, its like the driver saying "Sorry, I don't support edge-triggered triggers here."


--
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to