diff options
author | Ricardo Ribalda | 2020-12-23 14:35:25 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2021-01-27 15:06:47 +0100 |
commit | 59e92bf62771a5ff276f1c845c7b59d812d1dc8a (patch) | |
tree | 54a5e82768b61e3b46f7524d3515180729806fc3 /drivers/media/usb/uvc/uvcvideo.h | |
parent | 69df09547e7a310dd6c73c423e8826b93050b8a9 (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.h | 6 |
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)) \ |