Commit 46eabee1 authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni

rtc: isl12026: 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-2-wsa+renesas@sang-engineering.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 56422541
...@@ -454,9 +454,9 @@ static int isl12026_probe_new(struct i2c_client *client) ...@@ -454,9 +454,9 @@ static int isl12026_probe_new(struct i2c_client *client)
isl12026_force_power_modes(client); isl12026_force_power_modes(client);
priv->nvm_client = i2c_new_dummy(client->adapter, ISL12026_EEPROM_ADDR); priv->nvm_client = i2c_new_dummy_device(client->adapter, ISL12026_EEPROM_ADDR);
if (!priv->nvm_client) if (IS_ERR(priv->nvm_client))
return -ENOMEM; return PTR_ERR(priv->nvm_client);
priv->rtc = devm_rtc_allocate_device(&client->dev); priv->rtc = devm_rtc_allocate_device(&client->dev);
ret = PTR_ERR_OR_ZERO(priv->rtc); ret = PTR_ERR_OR_ZERO(priv->rtc);
......
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