i2c-omap: Switch to static adapter numbering
authorDavid Brownell <david-b@pacbell.net>
Tue, 1 May 2007 21:26:32 +0000 (23:26 +0200)
committerJean Delvare <khali@hyperion.delvare>
Tue, 1 May 2007 21:26:32 +0000 (23:26 +0200)
Update the OMAP I2C driver to use i2c_add_numbered_adapter(), so that
later patches can convert boards to using new-style drivers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-omap.c

index bcd8367cede1aa0dc13b221d14266166c1e9e346..e471e3bfdc1e08872dcc9d4dd23e1e81a5d422cd 100644 (file)
@@ -605,7 +605,8 @@ omap_i2c_probe(struct platform_device *pdev)
        adap->dev.parent = &pdev->dev;
 
        /* i2c device drivers may be active on return from add_adapter() */
-       r = i2c_add_adapter(adap);
+       adap->nr = pdev->id;
+       r = i2c_add_numbered_adapter(adap);
        if (r) {
                dev_err(dev->dev, "failure adding adapter\n");
                goto err_free_irq;