diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2012-06-22 09:47:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-22 21:24:27 -0700 |
commit | 970689f10e7447225eef39ceabd1898daec99553 (patch) | |
tree | 996b32b1c472d78a7f1b1ae83836516fb097318d | |
parent | 708706ff290545decbb7f43b533cb247e8ff64fd (diff) |
staging: iio: simplify timestamp alignment in iio_simple_dummy
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/iio/iio_simple_dummy_buffer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c b/drivers/staging/iio/iio_simple_dummy_buffer.c index d91196021c0..f4415da528a 100644 --- a/drivers/staging/iio/iio_simple_dummy_buffer.c +++ b/drivers/staging/iio/iio_simple_dummy_buffer.c @@ -85,8 +85,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p) } /* Store a timestampe at an 8 byte boundary */ if (indio_dev->scan_timestamp) - *(s64 *)(((phys_addr_t)data + len - + sizeof(s64) - 1) & ~(sizeof(s64) - 1)) + *(s64 *)((phys_addr_t)data + ALIGN(len, sizeof(s64))) = iio_get_time_ns(); buffer->access->store_to(buffer, (u8 *)data, pf->timestamp); |