diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-04-19 00:16:58 -0400 |
---|---|---|
committer | Greg KH <greg@press.kroah.org> | 2005-04-19 00:16:58 -0400 |
commit | 86b5ac878d4a63c772d03c5017b72cc799a8f2f2 (patch) | |
tree | ef4138c02aa447610146df63749e07c1859c3509 /drivers/i2c | |
parent | 05985715756b8667cb35a3e05e1668bb8afe3298 (diff) |
[PATCH] I2C: via686a cleanups
Here comes a small cleanup patch for the via686a driver. I noticed the
following two non-fatal problems:
1* The device parent is explicitely set, but it's not needed because the
i2c core will do as the client is registered.
2* snprintf is used where strlcpy would suffice.
Fixing them brings the via686a driver in line with what other similar
drivers do.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/chips/via686a.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c index 9b948f4531f5..ecd1e1de3f05 100644 --- a/drivers/i2c/chips/via686a.c +++ b/drivers/i2c/chips/via686a.c | |||
@@ -651,10 +651,9 @@ static int via686a_detect(struct i2c_adapter *adapter, int address, int kind) | |||
651 | new_client->adapter = adapter; | 651 | new_client->adapter = adapter; |
652 | new_client->driver = &via686a_driver; | 652 | new_client->driver = &via686a_driver; |
653 | new_client->flags = 0; | 653 | new_client->flags = 0; |
654 | new_client->dev.parent = &adapter->dev; | ||
655 | 654 | ||
656 | /* Fill in the remaining client fields and put into the global list */ | 655 | /* Fill in the remaining client fields and put into the global list */ |
657 | snprintf(new_client->name, I2C_NAME_SIZE, client_name); | 656 | strlcpy(new_client->name, client_name, I2C_NAME_SIZE); |
658 | 657 | ||
659 | data->valid = 0; | 658 | data->valid = 0; |
660 | init_MUTEX(&data->update_lock); | 659 | init_MUTEX(&data->update_lock); |