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 <[email protected]>
cc: Tomasz Figa <[email protected]>
cc: Mark Brown <[email protected]>
cc: Samuel Ortiz <[email protected]>
---
drivers/mfd/max8998.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c
index fe6332dcabee..5d6385998e83 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/