diff options
Diffstat (limited to 'drivers/iio/industrialio-buffer.c')
-rw-r--r-- | drivers/iio/industrialio-buffer.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 36b1ae92e239..0472ee268271 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -39,10 +39,7 @@ static bool iio_buffer_is_active(struct iio_buffer *buf) static bool iio_buffer_data_available(struct iio_buffer *buf) { - if (buf->access->data_available) - return buf->access->data_available(buf); - - return buf->stufftoread; + return buf->access->data_available(buf); } /** @@ -966,7 +963,7 @@ static int iio_buffer_update_demux(struct iio_dev *indio_dev, /* Now we have the two masks, work from least sig and build up sizes */ for_each_set_bit(out_ind, - indio_dev->active_scan_mask, + buffer->scan_mask, indio_dev->masklength) { in_ind = find_next_bit(indio_dev->active_scan_mask, indio_dev->masklength, |