diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-01-07 16:29:18 +0300 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-01-07 16:29:18 +0300 |
commit | 66c7acf61dc6b27954bb9ceb8617d447ac03734a (patch) | |
tree | 181d26436a00e62e9fc52df1b38740eaa23730d6 /drivers/i2c/busses/i2c-amd756.c | |
parent | 1561bfe59ca011d9a749dad4d96c2c22ebc86a4a (diff) | |
download | linux-66c7acf61dc6b27954bb9ceb8617d447ac03734a.tar.xz |
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.c')
-rw-r--r-- | drivers/i2c/busses/i2c-amd756.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index 424dad6f18d8..36bee5b9c952 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c @@ -380,8 +380,9 @@ static int __devinit amd756_probe(struct pci_dev *pdev, /* set up the sysfs linkage to our parent device */ amd756_smbus.dev.parent = &pdev->dev; - sprintf(amd756_smbus.name, "SMBus %s adapter at %04x", - chipname[id->driver_data], amd756_ioport); + snprintf(amd756_smbus.name, sizeof(amd756_smbus.name), + "SMBus %s adapter at %04x", chipname[id->driver_data], + amd756_ioport); error = i2c_add_adapter(&amd756_smbus); if (error) { |