omap-i2c: fix incorrect log message when using a device tree
authorFlorian Vaussard <florian.vaussard@epfl.ch>
Fri, 31 Aug 2012 11:02:55 +0000 (13:02 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Wed, 12 Sep 2012 13:54:14 +0000 (15:54 +0200)
When booting using a device tree, the adapter number is dynamically
assigned after the log message is sent.
This patch modifies the log message to get a correct adapter id.

Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch>
Tested-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-omap.c

index b149e3236da45ca50c8451409cddae1871a89d70..c78431a4970a814a814baac01a518c0f1e7112c8 100644 (file)
@@ -1175,9 +1175,6 @@ omap_i2c_probe(struct platform_device *pdev)
                goto err_unuse_clocks;
        }
 
-       dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
-                dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
-
        adap = &dev->adapter;
        i2c_set_adapdata(adap, dev);
        adap->owner = THIS_MODULE;
@@ -1195,6 +1192,9 @@ omap_i2c_probe(struct platform_device *pdev)
                goto err_unuse_clocks;
        }
 
+       dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
+                dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
+
        of_i2c_register_devices(adap);
 
        pm_runtime_mark_last_busy(dev->dev);