提交 e79cece0 编写于 作者: L Lars-Peter Clausen 提交者: Jonathan Cameron

iio:at91_adc: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Cc: Josh Wu <josh.wu@atmel.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 a1be505f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册