mfd: Don't abuse i2c_client.name
authorJean Delvare <khali@linux-fr.org>
Fri, 25 Sep 2009 12:15:59 +0000 (14:15 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 13 Dec 2009 18:20:40 +0000 (19:20 +0100)
The name field of struct i2c_client is for i2c-core's use, it should
never be changed by the drivers themselves.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab3100-core.c
drivers/mfd/twl4030-core.c

index 613481028272f114c754a4a652987fce90452cae..fd42a80e7bf95df87cfa6d88301b418fae596a96 100644 (file)
@@ -900,9 +900,6 @@ static int __init ab3100_probe(struct i2c_client *client,
                goto exit_no_testreg_client;
        }
 
-       strlcpy(ab3100->testreg_client->name, id->name,
-               sizeof(ab3100->testreg_client->name));
-
        err = ab3100_setup(ab3100);
        if (err)
                goto exit_no_setup;
index 40449cdf09db15acb93a3a6c11cfe468da4db12c..e3abbf66cc5cfa64691c73a50bdb62a5c29f9e38 100644 (file)
@@ -814,8 +814,6 @@ twl4030_probe(struct i2c_client *client, const struct i2c_device_id *id)
                                status = -ENOMEM;
                                goto fail;
                        }
-                       strlcpy(twl->client->name, id->name,
-                                       sizeof(twl->client->name));
                }
                mutex_init(&twl->xfer_lock);
        }