Commit cacdd414 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Petr Vandrovec

i2c: Removed the name variable from i2c_client as the dev one should be used instead.

parent b56a1471
...@@ -299,7 +299,7 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address, ...@@ -299,7 +299,7 @@ static int adm1021_detect(struct i2c_adapter *adapter, int address,
} }
/* Fill in the remaining client fields and put it into the global list */ /* Fill in the remaining client fields and put it into the global list */
strcpy(new_client->name, client_name); strncpy(new_client->dev.name, client_name, DEVICE_NAME_SIZE);
data->type = kind; data->type = kind;
new_client->id = adm1021_id++; new_client->id = adm1021_id++;
......
...@@ -180,7 +180,7 @@ static int lm75_detect(struct i2c_adapter *adapter, int address, ...@@ -180,7 +180,7 @@ static int lm75_detect(struct i2c_adapter *adapter, int address,
} }
/* Fill in the remaining client fields and put it into the global list */ /* Fill in the remaining client fields and put it into the global list */
strcpy(new_client->name, client_name); strncpy(new_client->dev.name, client_name, DEVICE_NAME_SIZE);
new_client->id = lm75_id++; new_client->id = lm75_id++;
data->valid = 0; data->valid = 0;
......
...@@ -291,9 +291,9 @@ int i2c_del_driver(struct i2c_driver *driver) ...@@ -291,9 +291,9 @@ int i2c_del_driver(struct i2c_driver *driver)
client->driver == driver) { client->driver == driver) {
DEB2(printk(KERN_DEBUG "i2c-core.o: " DEB2(printk(KERN_DEBUG "i2c-core.o: "
"detaching client %s:\n", "detaching client %s:\n",
client->name)); client->dev.name));
if ((res = driver->detach_client(client))) { if ((res = driver->detach_client(client))) {
dev_err(&adap->dev, "while " dev_err(&adap->dev, "while "
"unregistering driver " "unregistering driver "
"`%s', the client at " "`%s', the client at "
"address %02x of " "address %02x of "
...@@ -355,7 +355,7 @@ int i2c_attach_client(struct i2c_client *client) ...@@ -355,7 +355,7 @@ int i2c_attach_client(struct i2c_client *client)
printk(KERN_WARNING printk(KERN_WARNING
" i2c-core.o: attach_client(%s) - enlarge I2C_CLIENT_MAX.\n", " i2c-core.o: attach_client(%s) - enlarge I2C_CLIENT_MAX.\n",
client->name); client->dev.name);
out_unlock_list: out_unlock_list:
up(&adapter->list); up(&adapter->list);
...@@ -374,7 +374,7 @@ int i2c_attach_client(struct i2c_client *client) ...@@ -374,7 +374,7 @@ int i2c_attach_client(struct i2c_client *client)
} }
DEB(dev_dbg(&adapter->dev, "client [%s] registered to adapter " DEB(dev_dbg(&adapter->dev, "client [%s] registered to adapter "
"(pos. %d).\n", client->name, i)); "(pos. %d).\n", client->dev.name, i));
if (client->flags & I2C_CLIENT_ALLOW_USE) if (client->flags & I2C_CLIENT_ALLOW_USE)
client->usage_count = 0; client->usage_count = 0;
...@@ -395,7 +395,7 @@ int i2c_detach_client(struct i2c_client *client) ...@@ -395,7 +395,7 @@ int i2c_detach_client(struct i2c_client *client)
if (res) { if (res) {
printk(KERN_ERR printk(KERN_ERR
"i2c-core.o: client_unregister [%s] failed, " "i2c-core.o: client_unregister [%s] failed, "
"client not detached", client->name); "client not detached", client->dev.name);
goto out; goto out;
} }
} }
...@@ -410,7 +410,7 @@ int i2c_detach_client(struct i2c_client *client) ...@@ -410,7 +410,7 @@ int i2c_detach_client(struct i2c_client *client)
printk(KERN_WARNING printk(KERN_WARNING
" i2c-core.o: unregister_client [%s] not found\n", " i2c-core.o: unregister_client [%s] not found\n",
client->name); client->dev.name);
res = -ENODEV; res = -ENODEV;
out_unlock: out_unlock:
...@@ -522,7 +522,7 @@ static ssize_t i2cproc_bus_read(struct file *file, char *buf, ...@@ -522,7 +522,7 @@ static ssize_t i2cproc_bus_read(struct file *file, char *buf,
client = adapters[i]->clients[order[j]]; client = adapters[i]->clients[order[j]];
len += sprintf(kbuf+len,"%02x\t%-32s\t%-32s\n", len += sprintf(kbuf+len,"%02x\t%-32s\t%-32s\n",
client->addr, client->addr,
client->name, client->dev.name,
client->driver->name); client->driver->name);
} }
len = len - file->f_pos; len = len - file->f_pos;
......
...@@ -86,7 +86,9 @@ static struct i2c_driver i2cdev_driver = { ...@@ -86,7 +86,9 @@ static struct i2c_driver i2cdev_driver = {
}; };
static struct i2c_client i2cdev_client_template = { static struct i2c_client i2cdev_client_template = {
.name = "I2C /dev entry", .dev = {
.name = "I2C /dev entry",
},
.id = 1, .id = 1,
.addr = -1, .addr = -1,
.driver = &i2cdev_driver, .driver = &i2cdev_driver,
......
...@@ -156,7 +156,6 @@ extern struct bus_type i2c_bus_type; ...@@ -156,7 +156,6 @@ extern struct bus_type i2c_bus_type;
* function is mainly used for lookup & other admin. functions. * function is mainly used for lookup & other admin. functions.
*/ */
struct i2c_client { struct i2c_client {
char name[32];
int id; int id;
unsigned int flags; /* div., see below */ unsigned int flags; /* div., see below */
unsigned int addr; /* chip address - NOTE: 7bit */ unsigned int addr; /* chip address - NOTE: 7bit */
......
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