i2c-iop3xx: Switch to static adapter numbering
authorMartin Michlmayr <tbm@cyrius.com>
Thu, 12 Jul 2007 12:12:30 +0000 (14:12 +0200)
committerJean Delvare <khali@hyperion.delvare>
Thu, 12 Jul 2007 12:12:30 +0000 (14:12 +0200)
Update the IOP3xx I2C driver to use i2c_add_numbered_adapter(), so that
later patches can convert boards to using new-style drivers.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Tested-by: Voipio Riku <Riku.Voipio@movial.fi>
Cc: Dan J Williams <dan.j.williams@intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-iop3xx.c

index 90e2d9350c1bd12d390a2495872c837cc5959a5f..440342bc62e183d0d20b8acced8ea0a9a5cd5b86 100644 (file)
@@ -491,6 +491,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)
        new_adapter->id = I2C_HW_IOP3XX;
        new_adapter->owner = THIS_MODULE;
        new_adapter->dev.parent = &pdev->dev;
+       new_adapter->nr = pdev->id;
 
        /*
         * Default values...should these come in from board code?
@@ -508,7 +509,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, new_adapter);
        new_adapter->algo_data = adapter_data;
 
-       i2c_add_adapter(new_adapter);
+       i2c_add_numbered_adapter(new_adapter);
 
        return 0;