From: H Hartley Sweeten Date: Thu, 18 Sep 2014 18:35:40 +0000 (-0700) Subject: staging: comedi: rtd520: clear FIFO when canceling async command X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=351a7bffbd4a02dd8a46209a4c6582860a72601d;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: rtd520: clear FIFO when canceling async command 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 7d4cb140959c..7d04a7ec3d30 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -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; }