summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-at91.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-at91.c
parent1561bfe59ca011d9a749dad4d96c2c22ebc86a4a (diff)
downloadblackbird-op-linux-66c7acf61dc6b27954bb9ceb8617d447ac03734a.tar.gz
blackbird-op-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-at91.c')
-rw-r--r--drivers/i2c/busses/i2c-at91.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
index 9efb02137254..67d9dc5b351b 100644
--- a/drivers/i2c/busses/i2c-at91.c
+++ b/drivers/i2c/busses/i2c-at91.c
@@ -222,7 +222,7 @@ static int __devinit at91_i2c_probe(struct platform_device *pdev)
rc = -ENOMEM;
goto fail2;
}
- sprintf(adapter->name, "AT91");
+ snprintf(adapter->name, sizeof(adapter->name), "AT91");
adapter->algo = &at91_algorithm;
adapter->class = I2C_CLASS_HWMON;
adapter->dev.parent = &pdev->dev;
OpenPOWER on IntegriCloud