From 0dab04882ed3be085faf370b34f0e6fee5eb5afc Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 1 Sep 2014 12:03:55 +0100 Subject: [PATCH] staging: comedi: amplc_pci230: reduce indentation in pci230_ao_inttrig_scan_begin() Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci230.c | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index 727de3d75c7b..a44b056bc1b7 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -1226,28 +1226,25 @@ static int pci230_ao_inttrig_scan_begin(struct comedi_device *dev, return -EINVAL; spin_lock_irqsave(&devpriv->ao_stop_spinlock, irqflags); - if (devpriv->ao_cmd_started) { - /* Perform scan. */ - if (devpriv->hwver < 2) { - /* Not using DAC FIFO. */ - spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, - irqflags); - pci230_handle_ao_nofifo(dev, s); - comedi_event(dev, s); - } else { - /* Using DAC FIFO. */ - /* Read DACSWTRIG register to trigger conversion. */ - inw(devpriv->daqio + PCI230P2_DACSWTRIG); - spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, - irqflags); - } - /* Delay. Should driver be responsible for this? */ - /* XXX TODO: See if DAC busy bit can be used. */ - udelay(8); + if (!devpriv->ao_cmd_started) { + spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, irqflags); + return 1; + } + /* Perform scan. */ + if (devpriv->hwver < 2) { + /* Not using DAC FIFO. */ + spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, irqflags); + pci230_handle_ao_nofifo(dev, s); + comedi_event(dev, s); } else { + /* Using DAC FIFO. */ + /* Read DACSWTRIG register to trigger conversion. */ + inw(devpriv->daqio + PCI230P2_DACSWTRIG); spin_unlock_irqrestore(&devpriv->ao_stop_spinlock, irqflags); } - + /* Delay. Should driver be responsible for this? */ + /* XXX TODO: See if DAC busy bit can be used. */ + udelay(8); return 1; } -- 2.30.2