Map I2C adapter number to platform ID number

Signed-off-by: Kevin Wells <[email protected]>
---
i2c-pnx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- drivers/i2c/busses/i2c-pnx.c.orig   2009-11-11 14:54:30.000000000 -0800
+++ drivers/i2c/busses/i2c-pnx.c        2009-11-11 15:02:30.000000000 -0800
@@ -633,7 +633,8 @@ static int __devinit i2c_pnx_probe(struc
 
        /* 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to