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

index 36dcc7e0b90dea3260ab806ac52a1d36a4c8a65e..aae86ddd658ba9ed3bc45f837b23aaae3bf4ce3f 100644 (file)
@@ -146,11 +146,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)
        if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
                len = lis3l02dq_get_buffer_element(indio_dev, data);
 
-         /* Guaranteed to be aligned with 8 byte boundary */
-       if (indio_dev->scan_timestamp)
-               *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
-                       = pf->timestamp;
-       iio_push_to_buffers(indio_dev, data);
+       iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp);
 
        kfree(data);
 done: