lkml.org 
[lkml]   [2020]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: uvcvideo: add a missing newline when printing parameter 'clock'
Date
When I cat module parameter 'clock' by sysfs, it displays as follows. It
is better to add a newline for easy reading.

[root@hulk-202 ~]# cat /sys/module/uvcvideo/parameters/clock
CLOCK_MONOTONIC[root@hulk-202 ~]#

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
---
drivers/media/usb/uvc/uvc_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 431d86e..e4d2334 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2356,9 +2356,9 @@ static int uvc_reset_resume(struct usb_interface *intf)
static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp)
{
if (uvc_clock_param == CLOCK_MONOTONIC)
- return sprintf(buffer, "CLOCK_MONOTONIC");
+ return sprintf(buffer, "CLOCK_MONOTONIC\n");
else
- return sprintf(buffer, "CLOCK_REALTIME");
+ return sprintf(buffer, "CLOCK_REALTIME\n");
}

static int uvc_clock_param_set(const char *val, const struct kernel_param *kp)
--
1.7.12.4
\
 
 \ /
  Last update: 2020-05-11 11:12    [W:0.021 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site