From 019415ce5e00bcc0287f2ea88042b9fb685cdbcf Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Thu, 29 Jul 2010 17:50:51 +0100 Subject: [PATCH] staging: iio: ring_sw Fix pointer arithmetic for 64bit arches by using phys_addr_t Signed-off-by: Jonathan Cameron Acked-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/ring_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 9b3598e228ad..e2f01c640baf 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -478,7 +478,7 @@ void iio_sw_trigger_bh_to_ring(struct work_struct *work_s) /* Guaranteed to be aligned with 8 byte boundary */ if (st->indio_dev->scan_timestamp) - *(s64 *)(((u32)data + len + *(s64 *)(((phys_addr_t)data + len + sizeof(s64) - 1) & ~(sizeof(s64) - 1)) = st->last_timestamp; st->indio_dev->ring->access.store_to(st->indio_dev->ring, -- 2.39.5