summaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-buffer.c
diff options
context:
space:
mode:
authorJosselin Costanzi <josselin.costanzi@mobile-devices.fr>2014-06-27 18:20:00 +0200
committerJonathan Cameron <jic23@kernel.org>2014-06-29 15:43:38 +0200
commit9dd4694dafbd8b44ac4ca740beede18ca67d725f (patch)
treeef696cb9eb65ebd3ebd0942b2ede217eb843e360 /drivers/iio/industrialio-buffer.c
parentstaging: iio: Coding style issues fix. (diff)
downloadlinux-9dd4694dafbd8b44ac4ca740beede18ca67d725f.tar.xz
linux-9dd4694dafbd8b44ac4ca740beede18ca67d725f.zip
iio: staging: sca3000: hide stufftoread logic
Change sca3000_ring implementation so that it exports a data_available function to iio. Signed-off-by: Josselin Costanzi <josselin.costanzi@mobile-devices.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/industrialio-buffer.c')
-rw-r--r--drivers/iio/industrialio-buffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 36b1ae92e239..2952ee038477 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);
}
/**