Skip to content

Commit

Permalink
staging: iio: ring_sw Fix pointer arithmetic for 64bit arches by usin…
Browse files Browse the repository at this point in the history
…g 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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Aug 3, 2010
1 parent ccea5e1 commit 019415c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/ring_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 019415c

Please sign in to comment.