Commit ba972dac authored by Wolfram Sang's avatar Wolfram Sang Committed by Lee Jones

mfd: twl-core: 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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent ad9fc1f4
......@@ -1141,12 +1141,12 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
if (i == 0) {
twl->client = client;
} else {
twl->client = i2c_new_dummy(client->adapter,
twl->client = i2c_new_dummy_device(client->adapter,
client->addr + i);
if (!twl->client) {
if (IS_ERR(twl->client)) {
dev_err(&client->dev,
"can't attach client %d\n", i);
status = -ENOMEM;
status = PTR_ERR(twl->client);
goto fail;
}
}
......
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