summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-07-17 15:24:00 +0200
committerBen Dooks <ben-linux@fluff.org>2009-07-30 01:55:50 +0200
commit783fd6fa4c144e3f6913e6fed89de10a6dd715a5 (patch)
tree2702ace497e3361b0cbcf228896d9c73e21a2d08 /drivers/i2c
parenti2c-s3c2410: s3c24xx_i2c_init: don't clobber IICLC value (diff)
downloadlinux-783fd6fa4c144e3f6913e6fed89de10a6dd715a5.tar.xz
linux-783fd6fa4c144e3f6913e6fed89de10a6dd715a5.zip
i2c: strncpy does not null terminate string
strlcpy() will always null terminate the string. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index fdd83277c8a8..f2b82ee39adf 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -879,7 +879,7 @@ omap_i2c_probe(struct platform_device *pdev)
i2c_set_adapdata(adap, dev);
adap->owner = THIS_MODULE;
adap->class = I2C_CLASS_HWMON;
- strncpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
+ strlcpy(adap->name, "OMAP I2C adapter", sizeof(adap->name));
adap->algo = &omap_i2c_algo;
adap->dev.parent = &pdev->dev;