summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-sis630.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-01-07 16:29:18 +0300
committerJean Delvare <khali@linux-fr.org>2009-01-07 16:29:18 +0300
commit66c7acf61dc6b27954bb9ceb8617d447ac03734a (patch)
tree181d26436a00e62e9fc52df1b38740eaa23730d6 /drivers/i2c/busses/i2c-sis630.c
parent1561bfe59ca011d9a749dad4d96c2c22ebc86a4a (diff)
downloadlinux-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-sis630.c')
-rw-r--r--drivers/i2c/busses/i2c-sis630.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index e7c4b790da54..9c9c016ff2b5 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -487,8 +487,8 @@ static int __devinit sis630_probe(struct pci_dev *dev, const struct pci_device_i
/* set up the sysfs linkage to our parent device */
sis630_adapter.dev.parent = &dev->dev;
- sprintf(sis630_adapter.name, "SMBus SIS630 adapter at %04x",
- acpi_base + SMB_STS);
+ snprintf(sis630_adapter.name, sizeof(sis630_adapter.name),
+ "SMBus SIS630 adapter at %04x", acpi_base + SMB_STS);
return i2c_add_adapter(&sis630_adapter);
}