summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-sis5595.c
diff options
context:
space:
mode:
authorJean Delvare2009-01-07 14:29:18 +0100
committerJean Delvare2009-01-07 14:29:18 +0100
commit66c7acf61dc6b27954bb9ceb8617d447ac03734a (patch)
tree181d26436a00e62e9fc52df1b38740eaa23730d6 /drivers/i2c/busses/i2c-sis5595.c
parentInput: apanel - convert to new i2c binding (diff)
downloadkernel-qcow2-linux-66c7acf61dc6b27954bb9ceb8617d447ac03734a.tar.gz
kernel-qcow2-linux-66c7acf61dc6b27954bb9ceb8617d447ac03734a.tar.xz
kernel-qcow2-linux-66c7acf61dc6b27954bb9ceb8617d447ac03734a.zip
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-sis5595.c')
-rw-r--r--drivers/i2c/busses/i2c-sis5595.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
index dfc2d5eb6a68..8ce2daff985c 100644
--- a/drivers/i2c/busses/i2c-sis5595.c
+++ b/drivers/i2c/busses/i2c-sis5595.c
@@ -389,8 +389,8 @@ static int __devinit sis5595_probe(struct pci_dev *dev, const struct pci_device_
/* set up the sysfs linkage to our parent device */
sis5595_adapter.dev.parent = &dev->dev;
- sprintf(sis5595_adapter.name, "SMBus SIS5595 adapter at %04x",
- sis5595_base + SMB_INDEX);
+ snprintf(sis5595_adapter.name, sizeof(sis5595_adapter.name),
+ "SMBus SIS5595 adapter at %04x", sis5595_base + SMB_INDEX);
err = i2c_add_adapter(&sis5595_adapter);
if (err) {
release_region(sis5595_base + SMB_INDEX, 2);