Ian Abbott 5afdcad2f8 staging: comedi: comedi_test: limit maximum convert_arg
When testing the parameters for setting up an asynchronous command on
the AI subdevice, limit the maximum conversion period
(`cmd->convert_arg`) so that the number of conversions in a scan
(`cmd->scan_end_arg`, same as `cmd->chanlist_len`) multiplied by the
conversion period fits within an `unsigned int`, as that is used to
limit the minimum scan period (`cmd->scan_begin_arg`).

Also ensure rounding of the conversion period and scan period to the
nearest microsecond both fit in an `unsigned int`.  Do all this in stage
4 ("fix up any arguments") of the command testing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:58:36 +09:00
..
2015-10-02 11:05:58 +09:00
2015-10-02 14:46:15 -04:00
2015-10-27 09:13:38 +09:00
2015-10-24 07:28:05 +09:00
2015-10-16 12:07:43 -07:00
2015-10-21 10:18:11 +02:00
2015-10-07 09:35:15 +01:00
2015-09-17 21:41:02 -07:00
2015-09-18 09:28:20 -07:00
2015-10-11 10:02:30 -07:00
2015-09-21 12:02:27 -07:00
2015-10-21 17:02:13 +02:00
2015-09-18 09:28:20 -07:00