staging: comedi: dmm32at: remove dmm32at_ns_to_timer()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 11 Nov 2014 23:55:25 +0000 (16:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:33:23 +0000 (15:33 -0800)
This function is not necessary. It simply returns the 'ns' value that was
passed to it.

Remove it as well as the unnecessary Step 4 check of the cmd->convert_arg.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dmm32at.c

index 637b6651e5593cd2ffe910a5a493a1547f79fe7f..297338f4f46be55f9f3e6dbd5a41cfe6f7720421 100644 (file)
@@ -218,12 +218,6 @@ static int dmm32at_ai_insn_read(struct comedi_device *dev,
        return insn->n;
 }
 
-static int dmm32at_ns_to_timer(unsigned int *ns, unsigned int flags)
-{
-       /* trivial timer */
-       return *ns;
-}
-
 static int dmm32at_ai_check_chanlist(struct comedi_device *dev,
                                     struct comedi_subdevice *s,
                                     struct comedi_cmd *cmd)
@@ -304,11 +298,7 @@ static int dmm32at_ai_cmdtest(struct comedi_device *dev,
        if (err)
                return 3;
 
-       /* step 4: fix up any arguments */
-
-       arg = cmd->convert_arg;
-       dmm32at_ns_to_timer(&arg, cmd->flags);
-       err |= cfc_check_trigger_arg_is(&cmd->convert_arg, arg);
+       /* Step 4: fix up any arguments */
 
        arg = cmd->convert_arg * cmd->scan_end_arg;
        err |= cfc_check_trigger_arg_min(&cmd->scan_begin_arg, arg);