From: ray.jui@broadcom.com (Ray Jui)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH] i2c: don't print error when adding adapter fails
Date: Tue, 9 Aug 2016 09:15:41 -0700 [thread overview]
Message-ID: <1fc84a39-733e-5867-1f74-26a5076b18fc@broadcom.com> (raw)
In-Reply-To: <1470742581-12971-2-git-send-email-wsa-dev@sang-engineering.com>
Hi Wolfram,
On 8/9/2016 4:36 AM, Wolfram Sang wrote:
> The core will do this for us now.
>
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
[...]
> diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
> index 19c843828fe2ca..8e3477f9297eda 100644
> --- a/drivers/i2c/busses/i2c-bcm-iproc.c
> +++ b/drivers/i2c/busses/i2c-bcm-iproc.c
> @@ -488,13 +488,7 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev)
> adap->dev.parent = &pdev->dev;
> adap->dev.of_node = pdev->dev.of_node;
>
> - ret = i2c_add_adapter(adap);
> - if (ret) {
> - dev_err(iproc_i2c->device, "failed to add adapter\n");
> - return ret;
> - }
> -
> - return 0;
> + return i2c_add_adapter(adap);
> }
>
> static int bcm_iproc_i2c_remove(struct platform_device *pdev)
> diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
> index ac9f47679c3a4b..a5c9098507896b 100644
> --- a/drivers/i2c/busses/i2c-bcm-kona.c
> +++ b/drivers/i2c/busses/i2c-bcm-kona.c
> @@ -858,10 +858,8 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
> adap->dev.of_node = pdev->dev.of_node;
>
> rc = i2c_add_adapter(adap);
> - if (rc) {
> - dev_err(dev->device, "failed to add adapter\n");
> + if (rc)
> return rc;
> - }
>
> dev_info(dev->device, "device registered successfully\n");
>
For both i2c-bcm-iproc.c and i2c-bcm-kona.c:
Acked-by: Ray Jui <ray.jui@broadcom.com>
Thanks,
Ray
next prev parent reply other threads:[~2016-08-09 16:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 11:36 Wolfram Sang
2016-08-09 11:36 ` Wolfram Sang
2016-08-09 11:47 ` Grygorii Strashko
2016-08-09 11:48 ` Peter Korsgaard
2016-08-09 11:57 ` Uwe Kleine-König
2016-08-09 13:59 ` Wolfram Sang
2016-08-09 12:13 ` Heiko Stübner
2016-08-09 12:55 ` Neil Horman
2016-08-10 2:56 ` Zhang, Sonic
2016-08-09 12:58 ` Thierry Reding
2016-08-09 13:31 ` Guenter Roeck
2016-08-09 14:39 ` Wolfram Sang
2016-08-09 16:15 ` Ray Jui [this message]
2016-08-09 16:36 ` Vladimir Zapolskiy
2016-08-10 6:17 ` Ludovic Desroches
2016-08-10 8:32 ` Krzysztof Kozlowski
2016-08-10 8:34 ` Laxman Dewangan
2016-10-05 15:17 ` Jean Delvare
2016-08-09 16:45 ` Joachim Eastwood
2016-08-10 6:50 ` [STLinux Kernel] " Patrice Chotard
2016-08-14 22:17 ` Wolfram Sang
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=1fc84a39-733e-5867-1f74-26a5076b18fc@broadcom.com \
--to=ray.jui@broadcom.com \
--cc=linus-amlogic@lists.infradead.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
all inboxes | Powered by JetHome®