mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-12 19:44:51 -04:00
staging: comedi: addi_apci_3120: flip 'us_UseDma' test in apci3120_cyclic_ai()
For aesthetics, flip this test and do the DMA setup first. 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
76931af200
commit
5c66a77e1d
@@ -434,8 +434,10 @@ static int apci3120_cyclic_ai(int mode,
|
||||
|
||||
outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);
|
||||
|
||||
/* If DMA is disabled */
|
||||
if (!devpriv->us_UseDma) {
|
||||
if (devpriv->us_UseDma) {
|
||||
devpriv->b_InterruptMode = APCI3120_DMA_MODE;
|
||||
apci3120_setup_dma(dev, s);
|
||||
} else {
|
||||
/* disable EOC and enable EOS */
|
||||
devpriv->b_InterruptMode = APCI3120_EOS_MODE;
|
||||
|
||||
@@ -461,9 +463,6 @@ static int apci3120_cyclic_ai(int mode,
|
||||
devpriv->b_Timer2Mode = APCI3120_COUNTER;
|
||||
devpriv->b_Timer2Interrupt = 1;
|
||||
}
|
||||
} else {
|
||||
devpriv->b_InterruptMode = APCI3120_DMA_MODE;
|
||||
apci3120_setup_dma(dev, s);
|
||||
}
|
||||
|
||||
if (!devpriv->us_UseDma && cmd->stop_src == TRIG_COUNT)
|
||||
|
||||
Reference in New Issue
Block a user