aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/usb/uvc/uvcvideo.h
diff options
context:
space:
mode:
authorRicardo Ribalda2020-12-23 14:35:25 +0100
committerMauro Carvalho Chehab2021-01-27 15:06:47 +0100
commit59e92bf62771a5ff276f1c845c7b59d812d1dc8a (patch)
tree54a5e82768b61e3b46f7524d3515180729806fc3 /drivers/media/usb/uvc/uvcvideo.h
parent69df09547e7a310dd6c73c423e8826b93050b8a9 (diff)
media: uvcvideo: New macro uvc_trace_cont
Remove all the duplicated code around printk(KERN_CONT, with a new macro. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb/uvc/uvcvideo.h')
-rw-r--r--drivers/media/usb/uvc/uvcvideo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 11f61ff7cd86..6687949d93d9 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -758,6 +758,12 @@ do { \
printk(KERN_DEBUG "uvcvideo: " fmt, ##__VA_ARGS__); \
} while (0)
+#define uvc_trace_cont(flag, fmt, ...) \
+do { \
+ if (uvc_trace_param & flag) \
+ pr_cont(fmt, ##__VA_ARGS__); \
+} while (0)
+
#define uvc_warn_once(_dev, warn, fmt, ...) \
do { \
if (!test_and_set_bit(warn, &(_dev)->warnings)) \