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>
This commit is contained in:
Peter Meerwald 2012-06-22 09:47:42 +02:00 committed by Greg Kroah-Hartman
parent 708706ff29
commit 970689f10e

View File

@ -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);