diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-09-19 12:59:00 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-21 18:24:00 (GMT) |
commit | fdc8020c10161a460c4df0a0fe4a74847366a817 (patch) | |
tree | 8004444a0dd218e3a570ed5af9aef556f63ffe22 /drivers | |
parent | 3b271798330ede49dc41615ce4eceb7a3aef8cd9 (diff) | |
download | linux-fdc8020c10161a460c4df0a0fe4a74847366a817.tar.xz |
staging:iio:lis3l02dq: 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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_ring.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 36dcc7e..aae86dd 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -146,11 +146,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p) if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength)) len = lis3l02dq_get_buffer_element(indio_dev, data); - /* Guaranteed to be aligned with 8 byte boundary */ - if (indio_dev->scan_timestamp) - *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64))) - = pf->timestamp; - iio_push_to_buffers(indio_dev, data); + iio_push_to_buffers_with_timestamp(indio_dev, data, pf->timestamp); kfree(data); done: |