Commit 56eb5cbc authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: amplc_pci224: reduce leading whitespace in a few places

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 e0387561
...@@ -500,11 +500,10 @@ static void pci224_ao_stop(struct comedi_device *dev, ...@@ -500,11 +500,10 @@ static void pci224_ao_stop(struct comedi_device *dev,
spin_unlock_irqrestore(&devpriv->ao_spinlock, flags); spin_unlock_irqrestore(&devpriv->ao_spinlock, flags);
/* Reconfigure DAC for insn_write usage. */ /* Reconfigure DAC for insn_write usage. */
outw(0, dev->iobase + PCI224_DACCEN); /* Disable channels. */ outw(0, dev->iobase + PCI224_DACCEN); /* Disable channels. */
devpriv->daccon = COMBINE(devpriv->daccon, devpriv->daccon =
PCI224_DACCON_TRIG_SW | COMBINE(devpriv->daccon,
PCI224_DACCON_FIFOINTR_EMPTY, PCI224_DACCON_TRIG_SW | PCI224_DACCON_FIFOINTR_EMPTY,
PCI224_DACCON_TRIG_MASK | PCI224_DACCON_TRIG_MASK | PCI224_DACCON_FIFOINTR_MASK);
PCI224_DACCON_FIFOINTR_MASK);
outw(devpriv->daccon | PCI224_DACCON_FIFORESET, outw(devpriv->daccon | PCI224_DACCON_FIFORESET,
dev->iobase + PCI224_DACCON); dev->iobase + PCI224_DACCON);
} }
...@@ -644,8 +643,8 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev, ...@@ -644,8 +643,8 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev,
else else
trig = PCI224_DACCON_TRIG_EXTP; trig = PCI224_DACCON_TRIG_EXTP;
} }
devpriv->daccon = COMBINE(devpriv->daccon, trig, devpriv->daccon =
PCI224_DACCON_TRIG_MASK); COMBINE(devpriv->daccon, trig, PCI224_DACCON_TRIG_MASK);
outw(devpriv->daccon, dev->iobase + PCI224_DACCON); outw(devpriv->daccon, dev->iobase + PCI224_DACCON);
} }
...@@ -760,8 +759,8 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -760,8 +759,8 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
case TRIG_EXT: case TRIG_EXT:
/* Force to external trigger 0. */ /* Force to external trigger 0. */
if (cmd->start_arg & ~CR_FLAGS_MASK) { if (cmd->start_arg & ~CR_FLAGS_MASK) {
cmd->start_arg = COMBINE(cmd->start_arg, 0, cmd->start_arg =
~CR_FLAGS_MASK); COMBINE(cmd->start_arg, 0, ~CR_FLAGS_MASK);
err |= -EINVAL; err |= -EINVAL;
} }
/* The only flag allowed is CR_EDGE, which is ignored. */ /* The only flag allowed is CR_EDGE, which is ignored. */
...@@ -786,16 +785,16 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -786,16 +785,16 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
case TRIG_EXT: case TRIG_EXT:
/* Force to external trigger 0. */ /* Force to external trigger 0. */
if (cmd->scan_begin_arg & ~CR_FLAGS_MASK) { if (cmd->scan_begin_arg & ~CR_FLAGS_MASK) {
cmd->scan_begin_arg = COMBINE(cmd->scan_begin_arg, 0, cmd->scan_begin_arg =
~CR_FLAGS_MASK); COMBINE(cmd->scan_begin_arg, 0, ~CR_FLAGS_MASK);
err |= -EINVAL; err |= -EINVAL;
} }
/* Only allow flags CR_EDGE and CR_INVERT. Ignore CR_EDGE. */ /* Only allow flags CR_EDGE and CR_INVERT. Ignore CR_EDGE. */
if (cmd->scan_begin_arg & CR_FLAGS_MASK & if (cmd->scan_begin_arg & CR_FLAGS_MASK &
~(CR_EDGE | CR_INVERT)) { ~(CR_EDGE | CR_INVERT)) {
cmd->scan_begin_arg = COMBINE(cmd->scan_begin_arg, 0, cmd->scan_begin_arg =
CR_FLAGS_MASK & COMBINE(cmd->scan_begin_arg, 0,
~(CR_EDGE | CR_INVERT)); CR_FLAGS_MASK & ~(CR_EDGE | CR_INVERT));
err |= -EINVAL; err |= -EINVAL;
} }
break; break;
...@@ -811,14 +810,14 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -811,14 +810,14 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
case TRIG_EXT: case TRIG_EXT:
/* Force to external trigger 0. */ /* Force to external trigger 0. */
if (cmd->stop_arg & ~CR_FLAGS_MASK) { if (cmd->stop_arg & ~CR_FLAGS_MASK) {
cmd->stop_arg = COMBINE(cmd->stop_arg, 0, cmd->stop_arg =
~CR_FLAGS_MASK); COMBINE(cmd->stop_arg, 0, ~CR_FLAGS_MASK);
err |= -EINVAL; err |= -EINVAL;
} }
/* The only flag allowed is CR_EDGE, which is ignored. */ /* The only flag allowed is CR_EDGE, which is ignored. */
if (cmd->stop_arg & CR_FLAGS_MASK & ~CR_EDGE) { if (cmd->stop_arg & CR_FLAGS_MASK & ~CR_EDGE) {
cmd->stop_arg = COMBINE(cmd->stop_arg, 0, cmd->stop_arg =
CR_FLAGS_MASK & ~CR_EDGE); COMBINE(cmd->stop_arg, 0, CR_FLAGS_MASK & ~CR_EDGE);
} }
break; break;
case TRIG_NONE: case TRIG_NONE:
...@@ -924,14 +923,12 @@ static int pci224_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -924,14 +923,12 @@ static int pci224_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
* *
* N.B. DAC FIFO interrupts are currently disabled. * N.B. DAC FIFO interrupts are currently disabled.
*/ */
devpriv->daccon = COMBINE(devpriv->daccon, devpriv->daccon =
devpriv->hwrange[range] | COMBINE(devpriv->daccon,
PCI224_DACCON_TRIG_NONE | devpriv->hwrange[range] | PCI224_DACCON_TRIG_NONE |
PCI224_DACCON_FIFOINTR_NHALF, PCI224_DACCON_FIFOINTR_NHALF,
PCI224_DACCON_POLAR_MASK | PCI224_DACCON_POLAR_MASK | PCI224_DACCON_VREF_MASK |
PCI224_DACCON_VREF_MASK | PCI224_DACCON_TRIG_MASK | PCI224_DACCON_FIFOINTR_MASK);
PCI224_DACCON_TRIG_MASK |
PCI224_DACCON_FIFOINTR_MASK);
outw(devpriv->daccon | PCI224_DACCON_FIFORESET, outw(devpriv->daccon | PCI224_DACCON_FIFORESET,
dev->iobase + PCI224_DACCON); dev->iobase + PCI224_DACCON);
......
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