]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: iio: ring_sw Fix pointer arithmetic for 64bit arches by using phys_addr_t
authorJonathan Cameron <jic23@cam.ac.uk>
Thu, 29 Jul 2010 16:50:51 +0000 (17:50 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 Aug 2010 00:06:04 +0000 (17:06 -0700)
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>
drivers/staging/iio/ring_sw.c

index 9b3598e228adc4818430da9d6782060451e0ccf8..e2f01c640baf810896f2d50645441640b71d20a8 100644 (file)
@@ -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,