From: Lars-Peter Clausen Date: Thu, 19 Sep 2013 12:59:00 +0000 (+0100) Subject: iio:at91_adc: Use iio_push_to_buffers_with_timestamp() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e79cece0dc82c54b0c7903381ee8cfcdc3b5bfe1;p=linux-beck.git iio:at91_adc: Use iio_push_to_buffers_with_timestamp() Makes the code a bit shorter and less ugly. Signed-off-by: Lars-Peter Clausen Cc: Josh Wu Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 79c53b8e195c..5c8f690ce92f 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c @@ -83,13 +83,7 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p) j++; } - if (idev->scan_timestamp) { - s64 *timestamp = (s64 *)((u8 *)st->buffer + - ALIGN(j, sizeof(s64))); - *timestamp = pf->timestamp; - } - - iio_push_to_buffers(idev, st->buffer); + iio_push_to_buffers_with_timestamp(idev, st->buffer, pf->timestamp); iio_trigger_notify_done(idev->trig);