Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364011
b: refs/heads/master
c: c7c1161
h: refs/heads/master
i:
  364009: aabd910
  364007: e91c5f4
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 9, 2013
1 parent 7176707 commit 3860562
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 929b343297f3f7419a67dff4e8f4110f919682f8
refs/heads/master: c7c1161dfd98c00a1fa4691057b7418b8c26a1f2
8 changes: 3 additions & 5 deletions trunk/drivers/staging/comedi/drivers/rti800.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ static const struct rti800_board rti800_boardtypes[] = {
};

struct rti800_private {
enum {
adc_2comp, adc_straight
} adc_coding;
bool adc_2comp;
bool dac_2comp[2];
const struct comedi_lrange *ao_range_type_list[2];
unsigned int ao_readback[2];
Expand Down Expand Up @@ -221,7 +219,7 @@ static int rti800_ai_insn_read(struct comedi_device *dev,
data[i] = inb(dev->iobase + RTI800_ADCLO);
data[i] |= (0xf & inb(dev->iobase + RTI800_ADCHI)) << 8;

if (devpriv->adc_coding == adc_2comp)
if (devpriv->adc_2comp)
data[i] ^= 0x800;
}

Expand Down Expand Up @@ -338,7 +336,7 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return -ENOMEM;
dev->private = devpriv;

devpriv->adc_coding = it->options[4];
devpriv->adc_2comp = (it->options[4] == 0);
devpriv->dac_2comp[0] = (it->options[6] == 0);
devpriv->dac_2comp[1] = (it->options[8] == 0);
/* invalid, forces the MUXGAIN register to be set when first used */
Expand Down

0 comments on commit 3860562

Please sign in to comment.