[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200720073846.120724-1-wangxiongfeng2@huawei.com>
Date: Mon, 20 Jul 2020 15:38:46 +0800
From: Xiongfeng Wang <wangxiongfeng2@...wei.com>
To: <dmitry.torokhov@...il.com>
CC: <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<wangxiongfeng2@...wei.com>
Subject: [PATCH] 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@...kaller:~# cat /sys/module/psmouse/parameters/proto
autoroot@...kaller:~#
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@...wei.com>
---
drivers/input/mouse/psmouse-base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.20.1
Powered by blists - more mailing lists