Re: [PATCH] More i2c driver changes for 2.5.66

Greg KH
2003-04-03T00:07:41Z

ChangeSet 1.977.29.4, 2003/04/01 11:48:21-08:00, greg@kroah.com

[PATCH] i2c: change the way i2c creates the bus ids to actually be unique now.

It also is much like the old naming scheme, to keep things consistent.

drivers/i2c/i2c-core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c Wed Apr 2 16:01:44 2003
+++ b/drivers/i2c/i2c-core.c Wed Apr 2 16:01:44 2003
@@ -392,7 +392,8 @@
client->dev.driver = &client->driver->driver;
client->dev.bus = &i2c_bus_type;

- snprintf(&client->dev.bus_id[0], sizeof(client->dev.bus_id), "i2c_dev_%d", i);
+ snprintf(&client->dev.bus_id[0], sizeof(client->dev.bus_id),
+ "%d-%04x", i2c_adapter_id(adapter), client->addr);
printk("registering %s\n", client->dev.bus_id);
device_register(&client->dev);