staging:iio:ade7758: Use iio_push_to_buffers_with_timestamp()
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 19 Sep 2013 13:00:00 +0000 (14:00 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 Sep 2013 18:24:03 +0000 (19:24 +0100)
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>
drivers/staging/iio/meter/ade7758_ring.c

index 3d8bc2dbbc9ce07ac0d0aeb0d91948480a6ef891..4080995c99b6c42d00459282d90bf7cc602c7c70 100644 (file)
@@ -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);