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>
Šī revīzija ir iekļauta:
@@ -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) {
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user