aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/sun4i-ps2.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-08-18 15:05:06 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-08-18 15:44:08 -0700
commita9f08ad7adb3d2f90e11efbb40a1246ef95b0c04 (patch)
tree9543a9568c7675a456ee4927c97cde1aff8bf121 /drivers/input/serio/sun4i-ps2.c
parentInput: adc-joystick - add polled input device support (diff)
downloadlinux-dev-a9f08ad7adb3d2f90e11efbb40a1246ef95b0c04.tar.xz
linux-dev-a9f08ad7adb3d2f90e11efbb40a1246ef95b0c04.zip
Input: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20220818210022.6865-1-wsa+renesas@sang-engineering.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/serio/sun4i-ps2.c')
-rw-r--r--drivers/input/serio/sun4i-ps2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/sun4i-ps2.c b/drivers/input/serio/sun4i-ps2.c
index f15ed3dcdb9b..eb262640192e 100644
--- a/drivers/input/serio/sun4i-ps2.c
+++ b/drivers/input/serio/sun4i-ps2.c
@@ -256,8 +256,8 @@ static int sun4i_ps2_probe(struct platform_device *pdev)
serio->close = sun4i_ps2_close;
serio->port_data = drvdata;
serio->dev.parent = dev;
- strlcpy(serio->name, dev_name(dev), sizeof(serio->name));
- strlcpy(serio->phys, dev_name(dev), sizeof(serio->phys));
+ strscpy(serio->name, dev_name(dev), sizeof(serio->name));
+ strscpy(serio->phys, dev_name(dev), sizeof(serio->phys));
/* shutoff interrupt */
writel(0, drvdata->reg_base + PS2_REG_GCTL);