Skip to content

Commit

Permalink
Input: ati_remote2 - add missing newlines when printing module parame…
Browse files Browse the repository at this point in the history
…ters

When I cat some module parameters by sysfs, it displays as follows. It's
better to add a newline for easy reading.

root@syzkaller:~# cat /sys/module/ati_remote2/parameters/mode_mask
0x1froot@syzkaller:~# cat /sys/module/ati_remote2/parameters/channel_mask
0xffffroot@syzkaller:~#

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Link: https://lore.kernel.org/r/20200720092148.9320-1-wangxiongfeng2@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Xiongfeng Wang authored and Dmitry Torokhov committed Jul 22, 2020
1 parent 4aec14d commit 37bd9e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/misc/ati_remote2.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int ati_remote2_get_channel_mask(char *buffer,
{
pr_debug("%s()\n", __func__);

return sprintf(buffer, "0x%04x", *(unsigned int *)kp->arg);
return sprintf(buffer, "0x%04x\n", *(unsigned int *)kp->arg);
}

static int ati_remote2_set_mode_mask(const char *val,
Expand All @@ -84,7 +84,7 @@ static int ati_remote2_get_mode_mask(char *buffer,
{
pr_debug("%s()\n", __func__);

return sprintf(buffer, "0x%02x", *(unsigned int *)kp->arg);
return sprintf(buffer, "0x%02x\n", *(unsigned int *)kp->arg);
}

static unsigned int channel_mask = ATI_REMOTE2_MAX_CHANNEL_MASK;
Expand Down

0 comments on commit 37bd9e8

Please sign in to comment.