staging: comedi: pcl816: trigger sources were validated in (*do_cmdtest)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 10 Feb 2014 22:20:37 +0000 (15:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2014 17:31:31 +0000 (09:31 -0800)
The trigger sources were already validataed in the (*do_cmdtest) before the
(*do_cmd) is called. Remove the unnecessary checks in pcl816_ai_cmd().

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

index a35f230d1958fff4a767fd4d3ad6a7cb0fce674a..044722f3a51fbadcee307c1ea11e480a2ff1dc07 100644 (file)
@@ -480,15 +480,6 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int seglen;
 
-       if (cmd->start_src != TRIG_NOW)
-               return -EINVAL;
-       if (cmd->scan_begin_src != TRIG_FOLLOW)
-               return -EINVAL;
-       if (cmd->scan_end_src != TRIG_COUNT)
-               return -EINVAL;
-       if (cmd->scan_end_arg != cmd->chanlist_len)
-               return -EINVAL;
-/* if(cmd->chanlist_len>MAX_CHANLIST_LEN) return -EINVAL; */
        if (devpriv->irq_blocked)
                return -EBUSY;