staging:iio:mxs-lradc: 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:02 +0000 (19:24 +0100)
Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/mxs-lradc.c

index 7401230..9da64bf 100644 (file)
@@ -625,13 +625,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
                j++;
        }
 
-       if (iio->scan_timestamp) {
-               s64 *timestamp = (s64 *)((u8 *)lradc->buffer +
-                                       ALIGN(j, sizeof(s64)));
-               *timestamp = pf->timestamp;
-       }
-
-       iio_push_to_buffers(iio, lradc->buffer);
+       iio_push_to_buffers_with_timestamp(iio, lradc->buffer, pf->timestamp);
 
        iio_trigger_notify_done(iio->trig);