From: Sean Nyekjaer Date: Tue, 7 May 2019 08:23:04 +0000 (+0200) Subject: iio: adc: ti-ads8688: fix timestamp is not updated in buffer X-Git-Tag: v4.19.49~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5dede5c9e60503151e3f28c0955e4cb8757cadf2;p=platform%2Fkernel%2Flinux-rpi3.git iio: adc: ti-ads8688: fix timestamp is not updated in buffer commit e6d12298310fa1dc11f1d747e05b168016057fdd upstream. When using the hrtimer iio trigger timestamp isn't updated. If we use iio_get_time_ns it is updated correctly. Fixes: 2a86487786b5c ("iio: adc: ti-ads8688: add trigger and buffer support") Signed-off-by: Sean Nyekjaer Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index 8b4568e..7f16c77 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -397,7 +397,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p) } iio_push_to_buffers_with_timestamp(indio_dev, buffer, - pf->timestamp); + iio_get_time_ns(indio_dev)); iio_trigger_notify_done(indio_dev->trig);