From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: linux-i2c@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
Christian Ruppert <christian.ruppert@abilis.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] i2c: designware: Suppress error message if platform_get_irq() returns -EPROBE_DEFER
Date: Tue, 3 Mar 2015 18:27:36 +0300 [thread overview]
Message-ID: <1425396456-10633-1-git-send-email-abrodkin@synopsys.com> (raw)
There's no point in printing error message if platform_get_irq()
returns -EPROBE_DEFER because probe deferring subsystem already outputs
message in bootlog like this:
--->8---
platform e001d000.i2c: Driver i2c_designware requests probe deferral
--->8---
Moreover in case of probe deferral following message may mislead user:
--->8---
i2c_designware e001d000.i2c: no irq resource?
--->8---
even though it's expected that platform_get_irq() may return
-EPROBE_DEFER.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Christian Ruppert <christian.ruppert@abilis.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index c270f5f..01c1b17 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -144,7 +144,8 @@ static int dw_i2c_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0) {
- dev_err(&pdev->dev, "no irq resource?\n");
+ if (irq != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "no irq resource?\n");
return irq; /* -ENXIO */
}
--
2.1.0
next reply other threads:[~2015-03-03 15:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 15:27 Alexey Brodkin [this message]
2015-03-03 16:28 ` [PATCH] i2c: designware: Suppress error message if platform_get_irq() returns -EPROBE_DEFER Christian Ruppert
[not found] ` <54F5E120.3090705-Yycd8EPnGM5BDgjK7y7TUQ@public.gmane.org>
2015-03-03 16:37 ` Alexey Brodkin
[not found] ` <1425400650.17965.53.camel-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2015-03-03 16:50 ` christian.ruppert-Yycd8EPnGM5BDgjK7y7TUQ
2015-03-03 17:21 ` Wolfram Sang
2015-03-03 17:46 ` Christian Ruppert
2015-03-03 19:03 ` Andy Shevchenko
[not found] ` <1425409412.14897.157.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-03-03 19:11 ` Wolfram Sang
2015-03-03 19:34 ` Andy Shevchenko
2015-03-07 0:24 ` Wolfram Sang
2015-03-09 8:29 ` Alexey Brodkin
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=1425396456-10633-1-git-send-email-abrodkin@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=christian.ruppert@abilis.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa@the-dreams.de \
/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).