Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337699
b: refs/heads/master
c: 98efb70
h: refs/heads/master
i:
  337697: f5aa3ba
  337695: 032b026
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Nov 5, 2012
1 parent dd601bb commit 93e7b1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: fce7c3eac7d4ca77ada5bf8332f867219fbb5068
refs/heads/master: 98efb70adde96d86df29b4754f265b2c8bba01b2
6 changes: 3 additions & 3 deletions trunk/drivers/staging/iio/adc/ad7887.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ static int ad7887_read_raw(struct iio_dev *indio_dev,

if (ret < 0)
return ret;
*val = (ret >> st->chip_info->channel[0].scan_type.shift) &
RES_MASK(st->chip_info->channel[0].scan_type.realbits);
*val = ret >> chan->scan_type.shift;
*val &= RES_MASK(chan->scan_type.realbits);
return IIO_VAL_INT;
case IIO_CHAN_INFO_SCALE:
if (st->reg) {
Expand All @@ -190,7 +190,7 @@ static int ad7887_read_raw(struct iio_dev *indio_dev,
*val = st->chip_info->int_vref_mv;
}

*val2 = st->chip_info->channel[0].scan_type.realbits;
*val2 = chan->scan_type.realbits;

return IIO_VAL_FRACTIONAL_LOG2;
}
Expand Down

0 comments on commit 93e7b1a

Please sign in to comment.