aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-stu300.c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-01-31 09:09:23 -0500
committerBen Dooks <ben-linux@fluff.org>2011-02-22 18:53:44 -0500
commitf10820e49585f281706ac07570a9e1652bdb5dd9 (patch)
treee6e70cc53c680a2b92e40ced535fcf450de8d744 /drivers/i2c/busses/i2c-stu300.c
parentd8204a37baf5474d3154eb536c936369be2bd5c0 (diff)
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)
942 adap->owner = THIS_MODULE; 942 adap->owner = THIS_MODULE;
943 /* DDC class but actually often used for more generic I2C */ 943 /* DDC class but actually often used for more generic I2C */
944 adap->class = I2C_CLASS_DDC; 944 adap->class = I2C_CLASS_DDC;
945 strncpy(adap->name, "ST Microelectronics DDC I2C adapter", 945 strlcpy(adap->name, "ST Microelectronics DDC I2C adapter",
946 sizeof(adap->name)); 946 sizeof(adap->name));
947 adap->nr = bus_nr; 947 adap->nr = bus_nr;
948 adap->algo = &stu300_algo; 948 adap->algo = &stu300_algo;