[PATCH] media: uvcvideo: add a missing newline when printing parameter 'clock'
From: Xiongfeng Wang
Date: Mon May 11 2020 - 05:12:24 EST
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@xxxxxxxxxx>
---
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