mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
staging:iio:dummy: 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> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
4fa10de656
commit
09a799d04e
1 changed files with 2 additions and 5 deletions
|
@ -82,11 +82,8 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)
|
|||
len += 2;
|
||||
}
|
||||
}
|
||||
/* Store the timestamp at an 8 byte aligned offset */
|
||||
if (indio_dev->scan_timestamp)
|
||||
*(s64 *)((u8 *)data + ALIGN(len, sizeof(s64)))
|
||||
= iio_get_time_ns();
|
||||
iio_push_to_buffers(indio_dev, data);
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data, iio_get_time_ns());
|
||||
|
||||
kfree(data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue