Commit 6fb80bd6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[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.
parent 0be1a57e
...@@ -392,7 +392,8 @@ int i2c_attach_client(struct i2c_client *client) ...@@ -392,7 +392,8 @@ int i2c_attach_client(struct i2c_client *client)
client->dev.driver = &client->driver->driver; client->dev.driver = &client->driver->driver;
client->dev.bus = &i2c_bus_type; 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); printk("registering %s\n", client->dev.bus_id);
device_register(&client->dev); device_register(&client->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment