iio: adc: rcar-gyroadc: Cast pointer to uintptr_t to fix warning on 64-bit
authorGeert Uytterhoeven <[email protected]>
Wed, 4 Oct 2017 12:08:24 +0000 (14:08 +0200)
committerJonathan Cameron <[email protected]>
Mon, 9 Oct 2017 19:50:43 +0000 (20:50 +0100)
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 <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
drivers/iio/adc/rcar-gyroadc.c

index 2cb5397ceeea9ff404a3fd62c40e684b2409fcc7..0098c66a195724003d7dfa3bac390b9227590435 100644 (file)
@@ -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;