Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304436
b: refs/heads/master
c: f5ee7b8
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Apr 24, 2012
1 parent 981d9d0 commit a467dc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: c562ccbf584f8017a153bbd5c1039a189e1f8be8
refs/heads/master: f5ee7b807fc90756d6852690a3777db7093efe0d
11 changes: 3 additions & 8 deletions trunk/drivers/staging/iio/impedance-analyzer/ad5933.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,19 +569,14 @@ static const struct iio_info ad5933_info = {
static int ad5933_ring_preenable(struct iio_dev *indio_dev)
{
struct ad5933_state *st = iio_priv(indio_dev);
size_t d_size;
int ret;

if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
return -EINVAL;

d_size = bitmap_weight(indio_dev->active_scan_mask,
indio_dev->masklength) *
ad5933_channels[1].scan_type.storagebits / 8;

if (indio_dev->buffer->access->set_bytes_per_datum)
indio_dev->buffer->access->
set_bytes_per_datum(indio_dev->buffer, d_size);
ret = iio_sw_buffer_preenable(indio_dev);
if (ret < 0)
return ret;

ret = ad5933_reset(st);
if (ret < 0)
Expand Down

0 comments on commit a467dc7

Please sign in to comment.