summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2012-07-14 18:23:00 +0200
committerJonathan Cameron <jic23@kernel.org>2012-07-15 18:33:17 +0200
commit795876238f127089d96f268e2639eb0f56ec1a91 (patch)
tree25f8e13e991b972a2fac10b9c5500fb49608e69d /drivers/iio
parentstaging:iio:tsl2x7x: Ensure request_irq and free_irq dev_id parameter match (diff)
downloadlinux-795876238f127089d96f268e2639eb0f56ec1a91.tar.xz
linux-795876238f127089d96f268e2639eb0f56ec1a91.zip
iio: fix pointer cast warning
fix compile warning reported by Fengguang Wu: drivers/iio/light/adjd_s311.c: In function 'adjd_s311_trigger_handler': drivers/iio/light/adjd_s311.c:188:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] drivers/iio/light/adjd_s311.c:188:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 185 } 186 187 if (indio_dev->scan_timestamp) > 188 *(s64 *)((phys_addr_t)data->buffer + ALIGN(len, sizeof(s64))) 189 = time_ns; 190 iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns); 191 Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/adjd_s311.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c
index e4851427d72f..1cbb449b319a 100644
--- a/drivers/iio/light/adjd_s311.c
+++ b/drivers/iio/light/adjd_s311.c
@@ -185,7 +185,7 @@ static irqreturn_t adjd_s311_trigger_handler(int irq, void *p)
}
if (indio_dev->scan_timestamp)
- *(s64 *)((phys_addr_t)data->buffer + ALIGN(len, sizeof(s64)))
+ *(s64 *)((u8 *)data->buffer + ALIGN(len, sizeof(s64)))
= time_ns;
iio_push_to_buffer(buffer, (u8 *)data->buffer, time_ns);