mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mfd: palmas: Convert to i2c_new_dummy_device
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an ERRPTR which we use in error handling. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Lee Jones <[email protected]>
This commit is contained in:
parent
7a99c8f331
commit
ad9fc1f422
1 changed files with 3 additions and 3 deletions
|
|
@ -549,12 +549,12 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
|
|||
palmas->i2c_clients[i] = i2c;
|
||||
else {
|
||||
palmas->i2c_clients[i] =
|
||||
i2c_new_dummy(i2c->adapter,
|
||||
i2c_new_dummy_device(i2c->adapter,
|
||||
i2c->addr + i);
|
||||
if (!palmas->i2c_clients[i]) {
|
||||
if (IS_ERR(palmas->i2c_clients[i])) {
|
||||
dev_err(palmas->dev,
|
||||
"can't attach client %d\n", i);
|
||||
ret = -ENOMEM;
|
||||
ret = PTR_ERR(palmas->i2c_clients[i]);
|
||||
goto err_i2c;
|
||||
}
|
||||
palmas->i2c_clients[i]->dev.of_node = of_node_get(node);
|
||||
|
|
|
|||
Loading…
Reference in a new issue