summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-07-22 19:26:21 +0200
committerLee Jones <lee.jones@linaro.org>2019-08-12 09:53:58 +0200
commitba972dac9854a76202c4e798fa618e6d56ca2f81 (patch)
tree92f70693a2065cf6650f4cbba421500d2b779b91
parentmfd: palmas: Convert to i2c_new_dummy_device (diff)
downloadlinux-ba972dac9854a76202c4e798fa618e6d56ca2f81.tar.xz
linux-ba972dac9854a76202c4e798fa618e6d56ca2f81.zip
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: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/twl-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 448d9397ff04..20cf8cfe4f3b 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -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;
}
}