[PATCH 3/3] i2c: start dynamic I2C bus numbers at 32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To avoid clashes with bus numbers derived from device tree let's start
the dynamically assigned bus numbers at 32.

Usually the SoC internal I2C controllers with fixed bus numbers are
registered before any other controllers, but with deep probe support
this is no longer always true. In my case I saw a HDMI internal I2C
controller registered before some SoC controller messing up the
numbering.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/i2c/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 4eed7fb5c6..d19506af26 100644
--- a/drivers/i2c/i2c.c
+++ b/drivers/i2c/i2c.c
@@ -711,7 +711,7 @@ int i2c_add_numbered_adapter(struct i2c_adapter *adapter)
 	if (adapter->nr < 0) {
 		int nr;
 
-		for (nr = 0;; nr++)
+		for (nr = 32;; nr++)
 			if (!i2c_get_adapter(nr))
 				break;
 		adapter->nr = nr;

-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux