Commit 17ee971f authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Lee Jones

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: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Tested-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 7e9c40c6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment