summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-stu300.c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-01-31 17:09:23 +0300
committerBen Dooks <ben-linux@fluff.org>2011-02-23 02:53:44 +0300
commitf10820e49585f281706ac07570a9e1652bdb5dd9 (patch)
treee6e70cc53c680a2b92e40ced535fcf450de8d744 /drivers/i2c/busses/i2c-stu300.c
parentd8204a37baf5474d3154eb536c936369be2bd5c0 (diff)
downloadlinux-f10820e49585f281706ac07570a9e1652bdb5dd9.tar.xz
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/i2c/busses/i2c-stu300.c')
-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;