On 22/03/16 17:01, H Hartley Sweeten wrote:
Step 4 of the (*do_cmdtest) calls dt282x_ns_to_timer() to work out the
divisor needed to generate the 'convert_arg' timing. If the 'convert_arg'
timing can not be generated, the function returns the max timing that can
be generated.

The Step 3 'max' check of the 'convert_arg' isn't necessary.

Signed-off-by: H Hartley Sweeten <hswee...@visionengravers.com>
Cc: Ian Abbott <abbo...@mev.co.uk>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
  drivers/staging/comedi/drivers/dt282x.c | 2 --
  1 file changed, 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt282x.c 
b/drivers/staging/comedi/drivers/dt282x.c
index 06a87a1..be6a0bc 100644
--- a/drivers/staging/comedi/drivers/dt282x.c
+++ b/drivers/staging/comedi/drivers/dt282x.c
@@ -689,8 +689,6 @@ static int dt282x_ai_cmdtest(struct comedi_device *dev,

        err |= comedi_check_trigger_arg_min(&cmd->convert_arg, 4000);

-#define SLOWEST_TIMER  (250*(1<<15)*255)
-       err |= comedi_check_trigger_arg_max(&cmd->convert_arg, SLOWEST_TIMER);
        err |= comedi_check_trigger_arg_min(&cmd->convert_arg, board->ai_speed);
        err |= comedi_check_trigger_arg_is(&cmd->scan_end_arg,
                                           cmd->chanlist_len);


I'd be inclined to keep the existing check in place, as it goes with the arg_min test (although one of the arg_min tests on convert_arg is redundant, as you point out in patch 2).

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbo...@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to