summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-09-19 12:59:00 (GMT)
committerJonathan Cameron <jic23@kernel.org>2013-09-21 18:23:55 (GMT)
commite79cece0dc82c54b0c7903381ee8cfcdc3b5bfe1 (patch)
treee42277a13649e7da8d730e21bf2d8e147be11f8c /drivers
parenta1be505f49cacb288182c7281680ef5f93dea2f7 (diff)
downloadlinux-e79cece0dc82c54b0c7903381ee8cfcdc3b5bfe1.tar.xz
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 <lars@metafoo.de> Cc: Josh Wu <josh.wu@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/adc/at91_adc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 79c53b8..5c8f690 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);