From 1ebe5fca10efa7e2418cf30f66f7a80c084cecca Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Fri, 13 Jan 2017 10:34:05 -0300 Subject: [PATCH] mfd: max77686: Don't attempt to get i2c_device_id .data The driver is only used in platforms that have DT support so always the I2C device .data will be get from the matched OF node and never will be from the I2C device ID table. Signed-off-by: Javier Martinez Canillas Acked-by: Laxman Dewangan Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Lee Jones --- drivers/mfd/max77686.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index 7b68ed72e9cbf..ddae3bf3e46cf 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c @@ -188,14 +188,11 @@ static int max77686_i2c_probe(struct i2c_client *i2c, if (!max77686) return -ENOMEM; - if (i2c->dev.of_node) { - match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node); - if (!match) - return -EINVAL; - - max77686->type = (unsigned long)match->data; - } else - max77686->type = id->driver_data; + match = of_match_node(max77686_pmic_dt_match, i2c->dev.of_node); + if (!match) + return -EINVAL; + + max77686->type = (unsigned long)match->data; i2c_set_clientdata(i2c, max77686); max77686->dev = &i2c->dev; -- 2.39.5