Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281262
b: refs/heads/master
c: 950935b
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Dec 8, 2011
1 parent 491416e commit d8cfb35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 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: 9380d5ed36268432322fdd50c10bf0eb466b700a
refs/heads/master: 950935b17c67ddfedfc5cf917de3da7294307874
22 changes: 1 addition & 21 deletions trunk/drivers/staging/iio/adc/ad7793.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,25 +316,6 @@ static int ad7793_setup(struct ad7793_state *st)
return ret;
}

static int ad7793_scan_from_ring(struct ad7793_state *st, unsigned ch, int *val)
{
struct iio_buffer *ring = iio_priv_to_dev(st)->buffer;
int ret;
s64 dat64[2];
u32 *dat32 = (u32 *)dat64;

if (!(test_bit(ch, ring->scan_mask)))
return -EBUSY;

ret = ring->access->read_last(ring, (u8 *) &dat64);
if (ret)
return ret;

*val = *dat32;

return 0;
}

static int ad7793_ring_preenable(struct iio_dev *indio_dev)
{
struct ad7793_state *st = iio_priv(indio_dev);
Expand Down Expand Up @@ -650,8 +631,7 @@ static int ad7793_read_raw(struct iio_dev *indio_dev,
case 0:
mutex_lock(&indio_dev->mlock);
if (iio_buffer_enabled(indio_dev))
ret = ad7793_scan_from_ring(st,
chan->scan_index, &smpl);
ret = -EBUSY;
else
ret = ad7793_read(st, chan->address,
chan->scan_type.realbits / 8, &smpl);
Expand Down

0 comments on commit d8cfb35

Please sign in to comment.