Skip to content

Commit

Permalink
staging: comedi: adl_pci9111: cleanup pci9111_ao_insn_write()
Browse files Browse the repository at this point in the history
Remove the unnecessary comment.

Only the last data value written needs to be cached for
readback.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent 6b7044d commit 2084fd1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,22 +1035,22 @@ static int pci9111_ai_insn_read(struct comedi_device *dev,
return i;
}

/* Analog instant output */

static int
pci9111_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn,
unsigned int *data)
static int pci9111_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct pci9111_private_data *dev_private = dev->private;
unsigned int val = 0;
int i;

for (i = 0; i < insn->n; i++) {
outw(data[i], dev->iobase + PCI9111_AO_REG);
dev_private->ao_readback = data[i];
val = data[i];
outw(val, dev->iobase + PCI9111_AO_REG);
}
dev_private->ao_readback = val;

return i;
return insn->n;
}

static int pci9111_ao_insn_read(struct comedi_device *dev,
Expand Down

0 comments on commit 2084fd1

Please sign in to comment.