Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

omap-i2c: fix incorrect log message when using a device tree

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>

authored by

Florian Vaussard and committed by
Wolfram Sang
c5d3cd6d 0bdfe0cb

+3 -3
+3 -3
drivers/i2c/busses/i2c-omap.c
··· 1175 1175 goto err_unuse_clocks; 1176 1176 } 1177 1177 1178 - dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id, 1179 - dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed); 1180 - 1181 1178 adap = &dev->adapter; 1182 1179 i2c_set_adapdata(adap, dev); 1183 1180 adap->owner = THIS_MODULE; ··· 1191 1194 dev_err(dev->dev, "failure adding adapter\n"); 1192 1195 goto err_unuse_clocks; 1193 1196 } 1197 + 1198 + dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr, 1199 + dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed); 1194 1200 1195 1201 of_i2c_register_devices(adap); 1196 1202