Commit 36e0371e authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

iio:itg3200: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent aa4e2427
...@@ -55,11 +55,8 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p) ...@@ -55,11 +55,8 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)
if (ret < 0) if (ret < 0)
goto error_ret; goto error_ret;
if (indio_dev->scan_timestamp) iio_push_to_buffers_with_timestamp(indio_dev, buf, pf->timestamp);
memcpy(buf + indio_dev->scan_bytes - sizeof(s64),
&pf->timestamp, sizeof(pf->timestamp));
iio_push_to_buffers(indio_dev, buf);
iio_trigger_notify_done(indio_dev->trig); iio_trigger_notify_done(indio_dev->trig);
error_ret: error_ret:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment