staging: comedi: me4000: remove unnecessary me4000_ai_cancel()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 5 Aug 2015 17:45:12 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Aug 2015 22:03:30 +0000 (15:03 -0700)
The comedi core ensures that the subdevice is not busy before it allows
starting a new command. The subdevice (*cancel) is called when the
subdevice is set to not busy. In this driver the me4000_ai_cancel()
is the ai (*cancel) so the extra call in the ai (*do_cmd) is not
necessary. Remove it.

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/me4000.c

index 4a051b86100af646498f5dbaf56ae565e2d04585..b3d871b2b6a1958efb161f50e95ddf0f336e773a 100644 (file)
@@ -665,12 +665,6 @@ static int me4000_ai_do_cmd(struct comedi_device *dev,
        struct me4000_private *devpriv = dev->private;
        struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int ctrl;
-       int err;
-
-       /* Reset the analog input */
-       err = me4000_ai_cancel(dev, s);
-       if (err)
-               return err;
 
        /* Write timer arguments */
        outl(devpriv->ai_init_ticks - 1,
This page took 0.025585 seconds and 5 git commands to generate.