lkml.org 
[lkml]   [2003]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] More i2c driver changes for 2.5.66
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.045 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site