summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2016-04-21 12:04:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-28 22:19:49 -0700
commit7101711ee4706915380bdd103902e864380a6987 (patch)
treece1b34ec9a586936db104e0308987e8e5c1c2c72 /drivers/staging/comedi
parentba5c0da886c5f75f3bf7cab2f1f23a9ba05e04a5 (diff)
downloadblackbird-op-linux-7101711ee4706915380bdd103902e864380a6987.tar.gz
blackbird-op-linux-7101711ee4706915380bdd103902e864380a6987.zip
staging: comedi: ni_mio_common: simplify AI LINKC handling
Simplfy the LINKC handing for the analog input dma by moving it into the main interrupt handler. This function already hold the spinlock mite_channel_lock so call mite_sync_dma() directly instead of using the helper function. 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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_common.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 6e76c95a1e5c..9df1407a5c9d 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -1295,11 +1295,6 @@ static void handle_a_interrupt(struct comedi_device *dev,
{
struct comedi_cmd *cmd = &s->async->cmd;
-#ifdef PCIDMA
- if (ai_mite_status & CHSR_LINKC)
- ni_sync_ai_dma(dev);
-#endif
-
/* test for all uncommon interrupt events at the same time */
if (status & (NISTC_AI_STATUS1_ERR |
NISTC_AI_STATUS1_SC_TC | NISTC_AI_STATUS1_START1)) {
@@ -5166,9 +5161,12 @@ static irqreturn_t ni_E_interrupt(int irq, void *d)
unsigned int m_status;
spin_lock_irqsave(&devpriv->mite_channel_lock, flags_too);
- if (s_ai && devpriv->ai_mite_chan)
+ if (s_ai && devpriv->ai_mite_chan) {
ai_mite_status = mite_ack_linkc(devpriv->ai_mite_chan,
s_ai);
+ if (ai_mite_status & CHSR_LINKC)
+ mite_sync_dma(devpriv->ai_mite_chan, s_ai);
+ }
if (s_ao && devpriv->ao_mite_chan) {
m_status = mite_ack_linkc(devpriv->ao_mite_chan, s_ao);
OpenPOWER on IntegriCloud