mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Acked-by: Laxman Dewangan <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Tested-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Chanwoo Choi <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
7e9c40c639
commit
17ee971f03
1 changed files with 5 additions and 8 deletions
|
|
@ -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;
|
||||
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;
|
||||
max77686->type = (unsigned long)match->data;
|
||||
|
||||
i2c_set_clientdata(i2c, max77686);
|
||||
max77686->dev = &i2c->dev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue