Re: [PATCH] More i2c driver changes for 2.5.66

Greg KH (greg@kroah.com)
Wed, 2 Apr 2003 16:15:58 -0800


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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/