From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] rtc: s35390a: convert to i2c_new_dummy_device
Date: Mon, 22 Jul 2019 19:26:17 +0200 [thread overview]
Message-ID: <20190722172618.4061-4-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20190722172618.4061-1-wsa+renesas@sang-engineering.com>
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
next prev parent reply other threads:[~2019-07-22 17:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 17:26 [PATCH 0/4] rtc: convert subsystem to i2c_new_dummy_device() Wolfram Sang
2019-07-22 17:26 ` [PATCH 1/4] rtc: isl12026: convert to i2c_new_dummy_device Wolfram Sang
2019-07-22 17:26 ` [PATCH 2/4] rtc: max77686: " Wolfram Sang
2019-07-23 15:27 ` Krzysztof Kozlowski
2019-07-22 17:26 ` Wolfram Sang [this message]
2019-07-22 17:26 ` [PATCH 4/4] rtc: s5m: " Wolfram Sang
2019-07-23 15:32 ` Krzysztof Kozlowski
2019-07-22 20:50 ` [PATCH 0/4] rtc: convert subsystem to i2c_new_dummy_device() Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190722172618.4061-4-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).