提交 2a357345 编写于 作者: G Geert Uytterhoeven 提交者: Jonathan Cameron

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: NGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: NSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 68c91e7a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册