Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268589
b: refs/heads/master
c: 5357ba3
h: refs/heads/master
i:
  268587: 728b914
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Oct 3, 2011
1 parent 1dc3757 commit ffedaee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 7c626f58ab0095d7614636cc81f6081426903a37
refs/heads/master: 5357ba3df4af9da111fb351292c9a410b1f7ab0a
7 changes: 3 additions & 4 deletions trunk/drivers/staging/iio/adc/ad799x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,11 @@ static int ad799x_read_raw(struct iio_dev *dev_info,

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) &
RES_MASK(chan->scan_type.realbits);
return IIO_VAL_INT;
case (1 << IIO_CHAN_INFO_SCALE_SHARED):
scale_uv = (st->int_vref_mv * 1000)
>> st->chip_info->channel[0].scan_type.realbits;
scale_uv = (st->int_vref_mv * 1000) >> chan->scan_type.realbits;
*val = scale_uv / 1000;
*val2 = (scale_uv % 1000) * 1000;
return IIO_VAL_INT_PLUS_MICRO;
Expand Down

0 comments on commit ffedaee

Please sign in to comment.