[PATCH 2/3] i2c: gpio: use dynamic bus number unconditionally

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Nov 16 04:18:50 PST 2016


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 at 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




More information about the barebox mailing list