From: David Howells Date: Thu, 23 Jan 2014 23:54:04 +0000 (-0800) Subject: drivers/mfd/max8998.c: fix pointer-integer size mismatch warning in max8998_i2c_get_d... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f30c0c32b69b6467fa23e2798432262428587471;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drivers/mfd/max8998.c: fix pointer-integer size mismatch warning in max8998_i2c_get_driver_data() Fix up the following pointer-integer size mismatch warning in max8998_i2c_get_driver_data(): drivers/mfd/max8998.c: In function 'max8998_i2c_get_driver_data': drivers/mfd/max8998.c:178:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (int)match->data; ^ Signed-off-by: David Howells Cc: Tomasz Figa Cc: Mark Brown Cc: Samuel Ortiz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index f47eaa70eae0..612ca404e150 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c @@ -175,7 +175,7 @@ static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c, if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { const struct of_device_id *match; match = of_match_node(max8998_dt_match, i2c->dev.of_node); - return (int)match->data; + return (int)(long)match->data; } return (int)id->driver_data;