|
|
|
Re: [PATCH 2/3] iio staging: simplify timestamp alignment in iio_simple_dummy | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On 6/21/2012 10:02 PM, Peter Meerwald wrote:Hmm. I wonder how many other hand rolled versions of this are kicking about..
Good spot. Thanks,
Signed-off-by: Peter Meerwald <pmeerw@xxxxxxxxxx>
Acked-by: Jonathan Cameron <jic23@xxxxxxxxxx>
--- drivers/staging/iio/iio_simple_dummy_buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/iio/iio_simple_dummy_buffer.c b/drivers/staging/iio/iio_simple_dummy_buffer.c index d911960..f4415da 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)))
buffer->access->store_to(buffer, (u8 *)data, pf->timestamp);
-- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |
![]() |