From: Robert Schwebel <r.schwebel@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] i2c: omap: fix i2c bus number output
Date: Tue, 2 Jun 2015 21:03:51 +0200 [thread overview]
Message-ID: <1433271831-16279-1-git-send-email-r.schwebel@pengutronix.de> (raw)
When probing from devicetree, the output for several i2c host
controllers prints out a bus number of -1:
i2c-omap 44e0b000.i2c: bus -1 rev0.11 at 400 kHz
i2c-omap 4802a000.i2c: bus -1 rev0.11 at 400 kHz
i2c-omap 4819c000.i2c: bus -1 rev0.11 at 400 kHz
The call to i2c_add_numbered_adapter() in probe finds out the next free
bus number, so we move the output to a location where the number is
already determined.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
drivers/i2c/busses/i2c-omap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 4308963..330db98 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1091,9 +1091,6 @@ i2c_omap_probe(struct device_d *pdev)
/* reset ASAP, clearing any IRQs */
omap_i2c_init(i2c_omap);
- dev_info(pdev, "bus %d rev%d.%d at %d kHz\n",
- pdev->id, major, minor, i2c_omap->speed);
-
omap_i2c_idle(i2c_omap);
i2c_omap->adapter.master_xfer = omap_i2c_xfer,
@@ -1108,6 +1105,9 @@ i2c_omap_probe(struct device_d *pdev)
goto err_unuse_clocks;
}
+ dev_info(pdev, "bus %d rev%d.%d at %d kHz\n",
+ i2c_omap->adapter.nr, major, minor, i2c_omap->speed);
+
return 0;
err_unuse_clocks:
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2015-06-02 19:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 19:03 Robert Schwebel [this message]
2015-06-03 7:56 ` Sascha Hauer
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=1433271831-16279-1-git-send-email-r.schwebel@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=barebox@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