aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/imu/adis16400_ring.c
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2012-06-30 20:06:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-11-10 10:17:21 +0000
commit84b36ce5f79c01f792c623f14e92ed86cdccb42f (patch)
treeaa763089df10007bc42aa02b747e652e0b99003e /drivers/staging/iio/imu/adis16400_ring.c
parentstaging:iio: Move the ad7887 driver out of staging (diff)
downloadlinux-dev-84b36ce5f79c01f792c623f14e92ed86cdccb42f.tar.xz
linux-dev-84b36ce5f79c01f792c623f14e92ed86cdccb42f.zip
staging:iio: Add support for multiple buffers
Route all buffer writes through the demux. Addition or removal of a buffer results in tear down and setup of all the buffers for a given device. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Tested-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Diffstat (limited to 'drivers/staging/iio/imu/adis16400_ring.c')
-rw-r--r--drivers/staging/iio/imu/adis16400_ring.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/iio/imu/adis16400_ring.c b/drivers/staging/iio/imu/adis16400_ring.c
index 260bdd1a4681..d46c1e38cf7b 100644
--- a/drivers/staging/iio/imu/adis16400_ring.c
+++ b/drivers/staging/iio/imu/adis16400_ring.c
@@ -114,7 +114,6 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p)
struct iio_poll_func *pf = p;
struct iio_dev *indio_dev = pf->indio_dev;
struct adis16400_state *st = iio_priv(indio_dev);
- struct iio_buffer *ring = indio_dev->buffer;
int i = 0, j, ret = 0;
s16 *data;
@@ -148,9 +147,9 @@ static irqreturn_t adis16400_trigger_handler(int irq, void *p)
}
}
/* Guaranteed to be aligned with 8 byte boundary */
- if (ring->scan_timestamp)
+ if (indio_dev->scan_timestamp)
*((s64 *)(data + ((i + 3)/4)*4)) = pf->timestamp;
- iio_push_to_buffer(ring, (u8 *) data);
+ iio_push_to_buffers(indio_dev, (u8 *) data);
done:
kfree(data);