Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363865
b: refs/heads/master
c: 34db8ef
h: refs/heads/master
i:
  363863: d749e38
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 3, 2013
1 parent 3bcadec commit 245e77d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: b0ae4368d79dab6eddc53cd02659f203ff0f1cab
refs/heads/master: 34db8ef94650f7eb6c524c21d2c83bb12694fe5b
18 changes: 9 additions & 9 deletions trunk/drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,7 @@ struct rtd_private {
int xfer_count; /* # to transfer data. 0->1/2FIFO */
int flags; /* flag event modes */

/* channel list info */
/* chanBipolar tracks whether a channel is bipolar (and needs +2048) */
unsigned char chanBipolar[RTD_MAX_CHANLIST / 8]; /* bit array */
unsigned char chan_is_bipolar[RTD_MAX_CHANLIST / 8]; /* bit array */

unsigned int ao_readback[2];

Expand Down Expand Up @@ -483,17 +481,17 @@ static unsigned short rtd_convert_chan_gain(struct comedi_device *dev,
/* +-5 range */
r |= 0x000;
r |= (range & 0x7) << 4;
CHAN_ARRAY_SET(devpriv->chanBipolar, index);
CHAN_ARRAY_SET(devpriv->chan_is_bipolar, index);
} else if (range < thisboard->range_uni10) {
/* +-10 range */
r |= 0x100;
r |= ((range - thisboard->range_bip10) & 0x7) << 4;
CHAN_ARRAY_SET(devpriv->chanBipolar, index);
CHAN_ARRAY_SET(devpriv->chan_is_bipolar, index);
} else {
/* +10 range */
r |= 0x200;
r |= ((range - thisboard->range_uni10) & 0x7) << 4;
CHAN_ARRAY_CLEAR(devpriv->chanBipolar, index);
CHAN_ARRAY_CLEAR(devpriv->chan_is_bipolar, index);
}

switch (aref) {
Expand Down Expand Up @@ -624,7 +622,7 @@ static int rtd_ai_rinsn(struct comedi_device *dev,
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
/*printk ("rtd520: Got 0x%x after %d usec\n", d, ii+1); */
d = d >> 3; /* low 3 bits are marker lines */
if (CHAN_ARRAY_TEST(devpriv->chanBipolar, 0))
if (CHAN_ARRAY_TEST(devpriv->chan_is_bipolar, 0))
/* convert to comedi unsigned data */
data[n] = d + 2048;
else
Expand Down Expand Up @@ -658,7 +656,8 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,

d = readw(devpriv->las1 + LAS1_ADC_FIFO);
d = d >> 3; /* low 3 bits are marker lines */
if (CHAN_ARRAY_TEST(devpriv->chanBipolar, s->async->cur_chan)) {
if (CHAN_ARRAY_TEST(devpriv->chan_is_bipolar,
s->async->cur_chan)) {
/* convert to comedi unsigned data */
sample = d + 2048;
} else
Expand Down Expand Up @@ -689,7 +688,8 @@ static int ai_read_dregs(struct comedi_device *dev, struct comedi_subdevice *s)
}

d = d >> 3; /* low 3 bits are marker lines */
if (CHAN_ARRAY_TEST(devpriv->chanBipolar, s->async->cur_chan)) {
if (CHAN_ARRAY_TEST(devpriv->chan_is_bipolar,
s->async->cur_chan)) {
/* convert to comedi unsigned data */
sample = d + 2048;
} else
Expand Down

0 comments on commit 245e77d

Please sign in to comment.