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