mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] i2c: gpio: use dynamic bus number unconditionally
Date: Wed, 16 Nov 2016 13:18:50 +0100	[thread overview]
Message-ID: <20161116121851.12399-2-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20161116121851.12399-1-u.kleine-koenig@pengutronix.de>

While being a bit more random this helps dt setups where the id of a
platform device cannot easily be fixed anyhow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/busses/i2c-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 850db7b2f652..708193344aec 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -198,7 +198,7 @@ static int i2c_gpio_probe(struct device_d *dev)
 	adap->bus_recovery_info->set_scl = i2c_set_scl_gpio_value;
 	adap->bus_recovery_info->recover_bus = i2c_generic_scl_recovery;
 
-	adap->nr = dev->id;
+	adap->nr = -1;
 	ret = i2c_bit_add_numbered_bus(adap);
 	if (ret)
 		goto err_add_bus;
-- 
2.10.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-11-16 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 12:18 [PATCH 1/3] i2c: gpio: fix handling of return code of of_get_gpio Uwe Kleine-König
2016-11-16 12:18 ` Uwe Kleine-König [this message]
2016-11-16 12:18 ` [PATCH 3/3] i2c: algo-bit: remove prototype for non-existing function Uwe Kleine-König
2016-11-17  6:59 ` [PATCH 1/3] i2c: gpio: fix handling of return code of of_get_gpio 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=20161116121851.12399-2-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@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