From 2a35734564bd2dc4f73c9e230ff55892290a130f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 4 Oct 2017 14:08:24 +0200 Subject: [PATCH] iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit On 64-bit: drivers/iio/adc/rcar-gyroadc.c: In function 'rcar_gyroadc_parse_subdevs': drivers/iio/adc/rcar-gyroadc.c:352:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] childmode = (unsigned int)of_id->data; ^ Cast the pointer to uintptr_t instead of unsigned int to fix this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman Signed-off-by: Jonathan Cameron --- drivers/iio/adc/rcar-gyroadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/rcar-gyroadc.c b/drivers/iio/adc/rcar-gyroadc.c index 2cb5397ceeea..0098c66a1957 100644 --- a/drivers/iio/adc/rcar-gyroadc.c +++ b/drivers/iio/adc/rcar-gyroadc.c @@ -348,7 +348,7 @@ static int rcar_gyroadc_parse_subdevs(struct iio_dev *indio_dev) continue; } - childmode = (unsigned int)of_id->data; + childmode = (uintptr_t)of_id->data; switch (childmode) { case RCAR_GYROADC_MODE_SELECT_1_MB88101A: sample_width = 12; -- 2.30.2