diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2012-07-14 18:23:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-07-15 18:33:18 +0200 |
commit | dcbc3c414e62faa4e1a1e17421f89eceea6bee30 (patch) | |
tree | 4157a65c193b3bab94f4d051a6a8813026d9fff1 /drivers | |
parent | iio staging: fix cast warning (diff) | |
download | linux-dcbc3c414e62faa4e1a1e17421f89eceea6bee30.tar.xz linux-dcbc3c414e62faa4e1a1e17421f89eceea6bee30.zip |
iio staging: fix cast warning and cleanup alignment code
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/accel/lis3l02dq_ring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index d7f8af7678fd..18d108fd967a 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -151,8 +151,7 @@ static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p) /* Guaranteed to be aligned with 8 byte boundary */ if (indio_dev->scan_timestamp) - *(s64 *)(((phys_addr_t)data + len - + sizeof(s64) - 1) & ~(sizeof(s64) - 1)) + *(s64 *)((u8 *)data + ALIGN(len, sizeof(s64))) = pf->timestamp; buffer->access->store_to(buffer, (u8 *)data, pf->timestamp); |