summaryrefslogtreecommitdiff
path: root/drivers/media/pci/dm1105/dm1105.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-10 16:20:42 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 13:32:17 -0400
commitcc1e6315e83db0e517dd9279050b88adc83a7eba (patch)
tree2fab5c7b2a4f3f50a045357a41c419fccc975de2 /drivers/media/pci/dm1105/dm1105.c
parentc0decac19da3906d9b66291e57b7759489e1170f (diff)
media: replace strcpy() by strscpy()
The strcpy() function is being deprecated upstream. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/dm1105/dm1105.c')
-rw-r--r--drivers/media/pci/dm1105/dm1105.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c
index 1ddb0576fb7b..a84c8270ea13 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -1046,7 +1046,7 @@ static int dm1105_probe(struct pci_dev *pdev,
/* i2c */
i2c_set_adapdata(&dev->i2c_adap, dev);
- strcpy(dev->i2c_adap.name, DRIVER_NAME);
+ strscpy(dev->i2c_adap.name, DRIVER_NAME, sizeof(dev->i2c_adap.name));
dev->i2c_adap.owner = THIS_MODULE;
dev->i2c_adap.dev.parent = &pdev->dev;
dev->i2c_adap.algo = &dm1105_algo;
@@ -1057,7 +1057,8 @@ static int dm1105_probe(struct pci_dev *pdev,
goto err_dm1105_hw_exit;
i2c_set_adapdata(&dev->i2c_bb_adap, dev);
- strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+ strscpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME,
+ sizeof(dev->i2c_bb_adap.name));
dev->i2c_bb_adap.owner = THIS_MODULE;
dev->i2c_bb_adap.dev.parent = &pdev->dev;
dev->i2c_bb_adap.algo_data = &dev->i2c_bit;