瀏覽代碼

i2c-pnx: Map I2C adapter number to platform ID number

Map I2C adapter number to platform ID number

Signed-off-by: Kevin Wells <kevin.wells@nxp.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Kevin Wells 15 年之前
父節點
當前提交
155a49319f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/i2c/busses/i2c-pnx.c

+ 2 - 1
drivers/i2c/busses/i2c-pnx.c

@@ -638,7 +638,8 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
 
 	/* Register this adapter with the I2C subsystem */
 	i2c_pnx->adapter->dev.parent = &pdev->dev;
-	ret = i2c_add_adapter(i2c_pnx->adapter);
+	i2c_pnx->adapter->nr = pdev->id;
+	ret = i2c_add_numbered_adapter(i2c_pnx->adapter);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "I2C: Failed to add bus\n");
 		goto out_irq;