summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-09-19 14:00:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-09-21 19:24:03 +0100
commit9d6c39867cc6cdfb6198ec83165b72e0f14ef8b6 (patch)
tree96a254cc5aefa1779d22c7adf6d76ec782a21550
parent09a799d04eb17e19bbc80cb0e350a3ec89552b01 (diff)
staging:iio:ade7758: Use iio_push_to_buffers_with_timestamp()
Makes the code a bit shorter and less ugly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/meter/ade7758_ring.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c
index 3d8bc2dbbc9..4080995c99b 100644
--- a/drivers/staging/iio/meter/ade7758_ring.c
+++ b/drivers/staging/iio/meter/ade7758_ring.c
@@ -69,11 +69,7 @@ static irqreturn_t ade7758_trigger_handler(int irq, void *p)
if (ade7758_spi_read_burst(indio_dev) >= 0)
*dat32 = get_unaligned_be32(&st->rx_buf[5]) & 0xFFFFFF;
- /* Guaranteed to be aligned with 8 byte boundary */
- if (indio_dev->scan_timestamp)
- dat64[1] = pf->timestamp;
-
- iio_push_to_buffers(indio_dev, dat64);
+ iio_push_to_buffers_with_timestamp(indio_dev, dat64, pf->timestamp);
iio_trigger_notify_done(indio_dev->trig);