Re: [PATCH 07/34] staging: comedi: amplc_pci224: simplify cmd->stop_arg validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux