summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-07-22 19:26:17 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-07-23 20:34:31 +0200
commitca83542cdb5c14dd369de2539bdca2670d89feea (patch)
treeef2b1c88d1a982dd9c63d0473e9cae17774d84e2 /drivers/rtc
parentrtc: max77686: convert to i2c_new_dummy_device (diff)
downloadlinux-ca83542cdb5c14dd369de2539bdca2670d89feea.tar.xz
linux-ca83542cdb5c14dd369de2539bdca2670d89feea.zip
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: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20190722172618.4061-4-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-s35390a.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c
index 84806ff763cf..d773fd597bd5 100644
--- a/drivers/rtc/rtc-s35390a.c
+++ b/drivers/rtc/rtc-s35390a.c
@@ -450,12 +450,12 @@ static int s35390a_probe(struct i2c_client *client,
/* This chip uses multiple addresses, use dummy devices for them */
for (i = 1; i < 8; ++i) {
- s35390a->client[i] = i2c_new_dummy(client->adapter,
- client->addr + i);
- if (!s35390a->client[i]) {
+ s35390a->client[i] = i2c_new_dummy_device(client->adapter,
+ client->addr + i);
+ if (IS_ERR(s35390a->client[i])) {
dev_err(dev, "Address %02x unavailable\n",
client->addr + i);
- err = -EBUSY;
+ err = PTR_ERR(s35390a->client[i]);
goto exit_dummy;
}
}