Commit 39455e17 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: amplc_pci230: reduce indentation in pci230_ai_start()

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6303f15
...@@ -1928,7 +1928,9 @@ static void pci230_ai_start(struct comedi_device *dev, ...@@ -1928,7 +1928,9 @@ static void pci230_ai_start(struct comedi_device *dev,
async->events |= COMEDI_CB_EOA; async->events |= COMEDI_CB_EOA;
pci230_ai_stop(dev, s); pci230_ai_stop(dev, s);
comedi_event(dev, s); comedi_event(dev, s);
} else { return;
}
/* Enable ADC FIFO trigger level interrupt. */ /* Enable ADC FIFO trigger level interrupt. */
spin_lock_irqsave(&devpriv->isr_spinlock, irqflags); spin_lock_irqsave(&devpriv->isr_spinlock, irqflags);
devpriv->int_en |= PCI230_INT_ADC; devpriv->int_en |= PCI230_INT_ADC;
...@@ -1976,8 +1978,7 @@ static void pci230_ai_start(struct comedi_device *dev, ...@@ -1976,8 +1978,7 @@ static void pci230_ai_start(struct comedi_device *dev,
conv = PCI230_ADC_TRIG_Z2CT2; conv = PCI230_ADC_TRIG_Z2CT2;
break; break;
} }
devpriv->adccon = devpriv->adccon = (devpriv->adccon & ~PCI230_ADC_TRIG_MASK) | conv;
(devpriv->adccon & ~PCI230_ADC_TRIG_MASK) | conv;
outw(devpriv->adccon, devpriv->daqio + PCI230_ADCCON); outw(devpriv->adccon, devpriv->daqio + PCI230_ADCCON);
if (cmd->convert_src == TRIG_INT) if (cmd->convert_src == TRIG_INT)
async->inttrig = pci230_ai_inttrig_convert; async->inttrig = pci230_ai_inttrig_convert;
...@@ -2013,29 +2014,26 @@ static void pci230_ai_start(struct comedi_device *dev, ...@@ -2013,29 +2014,26 @@ static void pci230_ai_start(struct comedi_device *dev,
break; break;
case TRIG_EXT: case TRIG_EXT:
/* /*
* For CT0 on PCI230, the external * For CT0 on PCI230, the external trigger
* trigger (gate) signal comes from * (gate) signal comes from PPC0, which is
* PPC0, which is channel 16 of the DIO * channel 16 of the DIO subdevice. The
* subdevice. The application needs to * application needs to configure this as an
* configure this as an input in order * input in order to use it as an external scan
* to use it as an external scan
* trigger. * trigger.
*/ */
zgat = GAT_CONFIG(0, GAT_EXT); zgat = GAT_CONFIG(0, GAT_EXT);
break; break;
case TRIG_TIMER: case TRIG_TIMER:
/* /*
* Monostable CT0 triggered by rising * Monostable CT0 triggered by rising edge on
* edge on inverted output of CT1 * inverted output of CT1 (falling edge on CT1).
* (falling edge on CT1).
*/ */
zgat = GAT_CONFIG(0, GAT_NOUTNM2); zgat = GAT_CONFIG(0, GAT_NOUTNM2);
break; break;
case TRIG_INT: case TRIG_INT:
/* /*
* Monostable CT0 is triggered by * Monostable CT0 is triggered by inttrig
* inttrig function waggling the CT0 * function waggling the CT0 gate source.
* gate source.
*/ */
zgat = GAT_CONFIG(0, GAT_VCC); zgat = GAT_CONFIG(0, GAT_VCC);
break; break;
...@@ -2048,12 +2046,10 @@ static void pci230_ai_start(struct comedi_device *dev, ...@@ -2048,12 +2046,10 @@ static void pci230_ai_start(struct comedi_device *dev,
* gated on to start counting. * gated on to start counting.
*/ */
zgat = GAT_CONFIG(1, GAT_VCC); zgat = GAT_CONFIG(1, GAT_VCC);
outb(zgat, outb(zgat, dev->iobase + PCI230_ZGAT_SCE);
dev->iobase + PCI230_ZGAT_SCE);
break; break;
case TRIG_INT: case TRIG_INT:
async->inttrig = async->inttrig = pci230_ai_inttrig_scan_begin;
pci230_ai_inttrig_scan_begin;
break; break;
} }
} }
...@@ -2061,7 +2057,6 @@ static void pci230_ai_start(struct comedi_device *dev, ...@@ -2061,7 +2057,6 @@ static void pci230_ai_start(struct comedi_device *dev,
/* No longer need Z2-CT2. */ /* No longer need Z2-CT2. */
pci230_release_shared(dev, RES_Z2CT2, OWNER_AICMD); pci230_release_shared(dev, RES_Z2CT2, OWNER_AICMD);
} }
}
} }
static int pci230_ai_inttrig_start(struct comedi_device *dev, static int pci230_ai_inttrig_start(struct comedi_device *dev,
......
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