On 2014-04-16 17:44, Hartley Sweeten wrote:
On Wednesday, April 16, 2014 8:57 AM, Ian Abbott wrote:
On 2014-04-15 18:37, H Hartley Sweeten wrote:
The only time the chanlist can be NULL and chanlist_len < 1 is when a
COMEDI_CMDTEST ioctl is done, usually for the comedilib function
comedi_get_cmd_src_mask(). This comedilib function sets all the command
sources to TRIG_ANY and Step 1 of the (*do_cmdtest) will fail returning
a the mask of valid sources.
For the rest of the (*do_cmdtest) and the (*do_cmd) functions a valid
chanlist and chanlist_len >= 1 is required.
Modify the check in __comedi_get_user_chanlist() to allow a NULL
chanlist or chanlist_len < 1 only when all the command sources are
TRIG_ANY.
Remove the checks in the comedi_driver (*do_cmdtest) functions that
don't result in to much diff noise. The remaining ones will be removed
in following patches.
Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
NAK. This will break existing libcomedi library function
comedi_get_generic_timed(), which will call the COMEDI_CMDTEST ioctl
with a NULL chanlist (but with chanlist_len > 1) and with start_src etc.
set to values other than TRIG_ANY.
[snip]
Grrr... Missed that part in the comedilib __generic_timed() function.
Probably best to drop this series for now and I'll dig back into it.
FWIW, I think patches 20 onwards are okay!
--
-=( 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