Commit 7101711e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ba5c0da8
...@@ -1295,11 +1295,6 @@ static void handle_a_interrupt(struct comedi_device *dev, ...@@ -1295,11 +1295,6 @@ static void handle_a_interrupt(struct comedi_device *dev,
{ {
struct comedi_cmd *cmd = &s->async->cmd; 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 */ /* test for all uncommon interrupt events at the same time */
if (status & (NISTC_AI_STATUS1_ERR | if (status & (NISTC_AI_STATUS1_ERR |
NISTC_AI_STATUS1_SC_TC | NISTC_AI_STATUS1_START1)) { NISTC_AI_STATUS1_SC_TC | NISTC_AI_STATUS1_START1)) {
...@@ -5166,9 +5161,12 @@ static irqreturn_t ni_E_interrupt(int irq, void *d) ...@@ -5166,9 +5161,12 @@ static irqreturn_t ni_E_interrupt(int irq, void *d)
unsigned int m_status; unsigned int m_status;
spin_lock_irqsave(&devpriv->mite_channel_lock, flags_too); 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, ai_mite_status = mite_ack_linkc(devpriv->ai_mite_chan,
s_ai); s_ai);
if (ai_mite_status & CHSR_LINKC)
mite_sync_dma(devpriv->ai_mite_chan, s_ai);
}
if (s_ao && devpriv->ao_mite_chan) { if (s_ao && devpriv->ao_mite_chan) {
m_status = mite_ack_linkc(devpriv->ao_mite_chan, s_ao); m_status = mite_ack_linkc(devpriv->ao_mite_chan, s_ao);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment