i2c-pnx: Map I2C adapter number to platform ID number
authorKevin Wells <kevin.wells@nxp.com>
Wed, 11 Nov 2009 23:34:17 +0000 (00:34 +0100)
committerBen Dooks <ben-linux@fluff.org>
Wed, 9 Dec 2009 00:19:13 +0000 (00:19 +0000)
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>
drivers/i2c/busses/i2c-pnx.c

index fbab6846ae645a0a1324ecf3f23c939aae78289a..5d1c2603a130f84e8506535a79108ee8691f36d7 100644 (file)
@@ -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;