summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorXiongfeng Wang <wangxiongfeng2@huawei.com>2020-07-22 07:24:07 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-07-22 07:33:27 +0200
commit4aec14de3a15cf9789a0e19c847f164776f49473 (patch)
tree41eb33a3ab095940360bbc2274cba70d538aaff2 /drivers/input/mouse/psmouse-base.c
parentMerge branch 'for-linus' into next (diff)
downloadlinux-4aec14de3a15cf9789a0e19c847f164776f49473.tar.xz
linux-4aec14de3a15cf9789a0e19c847f164776f49473.zip
Input: psmouse - add a newline when printing 'proto' by sysfs
When I cat parameter 'proto' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/module/psmouse/parameters/proto autoroot@syzkaller:~# Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> Link: https://lore.kernel.org/r/20200720073846.120724-1-wangxiongfeng2@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r--drivers/input/mouse/psmouse-base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index 527ae0b9a191..0b4a3039f312 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -2042,7 +2042,7 @@ static int psmouse_get_maxproto(char *buffer, const struct kernel_param *kp)
{
int type = *((unsigned int *)kp->arg);
- return sprintf(buffer, "%s", psmouse_protocol_by_type(type)->name);
+ return sprintf(buffer, "%s\n", psmouse_protocol_by_type(type)->name);
}
static int __init psmouse_init(void)