[3.16-stable,12/87] iio: adc: fix building on 64-bit

Message ID 20170505194745.3627137-13-arnd@arndb.de
State New
Headers show
  • build warnings and errors
Related show

Commit Message

Arnd Bergmann May 5, 2017, 7:46 p.m.
On the 3.16 kernel, we get a harmless warning:

drivers/iio/adc/exynos_adc.c: In function 'exynos_adc_get_version':
drivers/iio/adc/exynos_adc.c:112:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

Upstream commit e49d99e0ecc8 ("iio: adc: exynos_adc: Add exynos_adc_data
structure to improve readability") in 3.17 removed the function, so
we can't backport a fix from upstream, but changing the cast to
use uintptr_t is the obvious fix.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

 drivers/iio/adc/exynos_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
index 010578f1d762..bb7c50cd3f72 100644
--- a/drivers/iio/adc/exynos_adc.c
+++ b/drivers/iio/adc/exynos_adc.c
@@ -109,7 +109,7 @@  static inline unsigned int exynos_adc_get_version(struct platform_device *pdev)
 	const struct of_device_id *match;
 	match = of_match_node(exynos_adc_match, pdev->dev.of_node);
-	return (unsigned int)match->data;
+	return (uintptr_t)match->data;
 static void exynos_adc_hw_init(struct exynos_adc *info)