summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-01-31 15:09:23 +0100
committerBen Dooks <ben-linux@fluff.org>2011-02-22 23:53:44 +0000
commitf10820e49585f281706ac07570a9e1652bdb5dd9 (patch)
treee6e70cc53c680a2b92e40ced535fcf450de8d744 /drivers
parentd8204a37baf5474d3154eb536c936369be2bd5c0 (diff)
downloadlinux-f10820e49585f281706ac07570a9e1652bdb5dd9.tar.bz2
i2c-stu300: make sure adapter-name is terminated
Use strlcpy instead of strncpy. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Linus Walleij <linus.walleij@stericsson.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-stu300.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index 495be451d326..266135ddf7fa 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -942,7 +942,7 @@ stu300_probe(struct platform_device *pdev)
adap->owner = THIS_MODULE;
/* DDC class but actually often used for more generic I2C */
adap->class = I2C_CLASS_DDC;
- strncpy(adap->name, "ST Microelectronics DDC I2C adapter",
+ strlcpy(adap->name, "ST Microelectronics DDC I2C adapter",
sizeof(adap->name));
adap->nr = bus_nr;
adap->algo = &stu300_algo;