lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] rtc: s35390a: convert to i2c_new_dummy_device
Date
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>
---

Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.

drivers/rtc/rtc-s35390a.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c
index 84806ff763cf..5826209a3f30 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,
+ s35390a->client[i] = i2c_new_dummy_device(client->adapter,
client->addr + i);
- if (!s35390a->client[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;
}
}
--
2.20.1
\
 
 \ /
  Last update: 2019-07-22 19:29    [W:0.063 / U:0.652 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site