From: Geert Uytterhoeven Date: Wed, 4 Oct 2017 12:08:24 +0000 (+0200) Subject: iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2a35734564bd2dc4f73c9e230ff55892290a130f;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;