Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175073
b: refs/heads/master
c: 988da29
h: refs/heads/master
i:
  175071: 09f51a4
v: v3
  • Loading branch information
Bruce Jones authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent e2d3964 commit babec4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c146810e30f7818e95a90e36725c23facef833a
refs/heads/master: 988da29c48ca2fc1144a2f11ca7f78c32b6da83b
18 changes: 6 additions & 12 deletions trunk/drivers/staging/comedi/drivers/ni_atmio16d.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,8 @@ static int atmio16d_ai_insn_read(struct comedi_device *dev,
/* read the data now */
data[i] = inw(dev->iobase + AD_FIFO_REG);
/* change to two's complement if need be */
if (devpriv->adc_coding == adc_2comp) {
if (devpriv->adc_coding == adc_2comp)
data[i] ^= 0x800;
}
break;
}
if (status & STAT_AD_OVERFLOW) {
Expand Down Expand Up @@ -618,10 +617,8 @@ static int atmio16d_ao_insn_read(struct comedi_device *dev,
printk("atmio16d_ao_insn_read\n");
#endif

for (i = 0; i < insn->n; i++) {
for (i = 0; i < insn->n; i++)
data[i] = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
}

return i;
}

Expand All @@ -642,15 +639,13 @@ static int atmio16d_ao_insn_write(struct comedi_device *dev,
d = data[i];
switch (chan) {
case 0:
if (devpriv->dac0_coding == dac_2comp) {
if (devpriv->dac0_coding == dac_2comp)
d ^= 0x800;
}
outw(d, dev->iobase + DAC0_REG);
break;
case 1:
if (devpriv->dac1_coding == dac_2comp) {
if (devpriv->dac1_coding == dac_2comp)
d ^= 0x800;
}
outw(d, dev->iobase + DAC1_REG);
break;
default:
Expand Down Expand Up @@ -855,11 +850,10 @@ static int atmio16d_attach(struct comedi_device *dev,

/* 8255 subdevice */
s++;
if (boardtype->has_8255) {
if (boardtype->has_8255)
subdev_8255_init(dev, s, NULL, dev->iobase);
} else {
else
s->type = COMEDI_SUBD_UNUSED;
}

/* don't yet know how to deal with counter/timers */
#if 0
Expand Down

0 comments on commit babec4f

Please sign in to comment.