staging: comedi: rtd520: clear FIFO when canceling async command
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 18 Sep 2014 18:35:40 +0000 (11:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:24 +0000 (10:29 +0800)
Clear the A/D FIFO as part of the analog input (*cancel) to help with
cleaning up the async command.

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

index 7d4cb140959cbfccb96a2bafb2ef25c2be7b9948..7d04a7ec3d306391cedd30d713d11aaaf2ea937f 100644 (file)
@@ -1083,6 +1083,7 @@ static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
        devpriv->ai_count = 0;  /* stop and don't transfer any more */
        status = readw(dev->mmio + LAS0_IT);
        overrun = readl(dev->mmio + LAS0_OVERRUN) & 0xffff;
+       writel(0, dev->mmio + LAS0_ADC_FIFO_CLEAR);
        return 0;
 }
 
This page took 0.025217 seconds and 5 git commands to generate.