Commit ca83542c authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni

rtc: s35390a: 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>
Link: https://lore.kernel.org/r/20190722172618.4061-4-wsa+renesas@sang-engineering.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 7150710f
...@@ -450,12 +450,12 @@ static int s35390a_probe(struct i2c_client *client, ...@@ -450,12 +450,12 @@ static int s35390a_probe(struct i2c_client *client,
/* This chip uses multiple addresses, use dummy devices for them */ /* This chip uses multiple addresses, use dummy devices for them */
for (i = 1; i < 8; ++i) { for (i = 1; i < 8; ++i) {
s35390a->client[i] = i2c_new_dummy(client->adapter, s35390a->client[i] = i2c_new_dummy_device(client->adapter,
client->addr + i); client->addr + i);
if (!s35390a->client[i]) { if (IS_ERR(s35390a->client[i])) {
dev_err(dev, "Address %02x unavailable\n", dev_err(dev, "Address %02x unavailable\n",
client->addr + i); client->addr + i);
err = -EBUSY; err = PTR_ERR(s35390a->client[i]);
goto exit_dummy; goto exit_dummy;
} }
} }
......
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