mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
staging: iio: ring_sw Fix pointer arithmetic for 64bit arches by using phys_addr_t
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ccea5e1d0f
commit
019415ce5e
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue