From: Hu Yadi <Yadi.hu@xxxxxxxxxxxxx> The eg20t driver uses i2c_add_numbered_adapter() to register adapter: pch_adap->nr = i; ret = i2c_add_numbered_adapter(pch_adap); Variable i is assigned to 0, it means that i2c_eg20t is the first adapter by default. if another adapter registers before eg20t, above code return error for index conflict: i2c_eg20t 0000:05:0c.2: pch_i2c_probe :i2c_add_adapter[ch:0] FAILED i2c_eg20t: probe of 0000:05:0c.2 failed with error -16 So, we can replace i2c_add_numbered_adapter() with i2c_add_adapter() interface.since it dynamically allocates the index number. Signed-off-by: Hu Yadi <Yadi.hu@xxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-eg20t.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index 7a51ddc..2f4c2af 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c @@ -913,8 +913,7 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev, pch_i2c_init(&adap_info->pch_data[i]); - pch_adap->nr = i; - ret = i2c_add_numbered_adapter(pch_adap); + ret = i2c_add_adapter(pch_adap); if (ret) { pch_pci_err(pdev, "i2c_add_adapter[ch:%d] FAILED\n", i); goto err_add_adapter; -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html