summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-amd756-s4882.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-01-07 14:29:18 +0100
committerJean Delvare <khali@linux-fr.org>2009-01-07 14:29:18 +0100
commit66c7acf61dc6b27954bb9ceb8617d447ac03734a (patch)
tree181d26436a00e62e9fc52df1b38740eaa23730d6 /drivers/i2c/busses/i2c-amd756-s4882.c
parent1561bfe59ca011d9a749dad4d96c2c22ebc86a4a (diff)
i2c: Use snprintf to set adapter names
Use snprintf instead of sprintf to set adapter names, it's safer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-amd756-s4882.c')
-rw-r--r--drivers/i2c/busses/i2c-amd756-s4882.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c
index 8ba2bcf727d..378fcb5d578 100644
--- a/drivers/i2c/busses/i2c-amd756-s4882.c
+++ b/drivers/i2c/busses/i2c-amd756-s4882.c
@@ -197,8 +197,8 @@ static int __init amd756_s4882_init(void)
for (i = 1; i < 5; i++) {
s4882_algo[i] = *(amd756_smbus.algo);
s4882_adapter[i] = amd756_smbus;
- sprintf(s4882_adapter[i].name,
- "SMBus 8111 adapter (CPU%d)", i-1);
+ snprintf(s4882_adapter[i].name, sizeof(s4882_adapter[i].name),
+ "SMBus 8111 adapter (CPU%d)", i-1);
s4882_adapter[i].algo = s4882_algo+i;
s4882_adapter[i].dev.parent = amd756_smbus.dev.parent;
}