diff options
author | Joe Perches <joe@perches.com> | 2020-12-23 14:35:27 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-27 15:08:19 +0100 |
commit | 9e56380ae62543fc2043715050b80d494b2b1553 (patch) | |
tree | ae50075d464b48c8c9cbcfa68b1d3c17bca824ac /drivers/media/usb/uvc/uvc_isight.c | |
parent | ed4c5fa4d804f57fa820d8ef8d3054be2ed13bea (diff) | |
download | lwn-9e56380ae62543fc2043715050b80d494b2b1553.tar.gz lwn-9e56380ae62543fc2043715050b80d494b2b1553.zip |
media: uvcvideo: Rename debug functions
trace isn't a good name as it's not a trace mechanism, it is a
typical debug mechanism.
Rename uvc_trace/uvc_trace_cont macros to uvc_dbg/uvc_dbg_cont.
Rename uvc_trace_param to uvc_dbg_param
Rename UVC_TRACE_<FOO> defines to UVC_DBG_<FOO>
Use ## concatenation in uvc_dbg macros to avoid overly long and
repetitive UVC_DBG uses
Signed-off-by: Joe Perches <joe@perches.com>
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/uvc_isight.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_isight.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/media/usb/uvc/uvc_isight.c b/drivers/media/usb/uvc/uvc_isight.c index 445c4d39aeff..2578d6ee4829 100644 --- a/drivers/media/usb/uvc/uvc_isight.c +++ b/drivers/media/usb/uvc/uvc_isight.c @@ -50,16 +50,15 @@ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf, if ((len >= 14 && memcmp(&data[2], hdr, 12) == 0) || (len >= 15 && memcmp(&data[3], hdr, 12) == 0)) { - uvc_trace(stream->dev, UVC_TRACE_FRAME, - "iSight header found\n"); + uvc_dbg(stream->dev, FRAME, "iSight header found\n"); is_header = 1; } /* Synchronize to the input stream by waiting for a header packet. */ if (buf->state != UVC_BUF_STATE_ACTIVE) { if (!is_header) { - uvc_trace(stream->dev, UVC_TRACE_FRAME, - "Dropping packet (out of sync).\n"); + uvc_dbg(stream->dev, FRAME, + "Dropping packet (out of sync)\n"); return 0; } @@ -87,8 +86,8 @@ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf, buf->bytesused += nbytes; if (len > maxlen || buf->bytesused == buf->length) { - uvc_trace(stream->dev, UVC_TRACE_FRAME, - "Frame complete (overflow).\n"); + uvc_dbg(stream->dev, FRAME, + "Frame complete (overflow)\n"); buf->state = UVC_BUF_STATE_DONE; } } @@ -105,9 +104,9 @@ void uvc_video_decode_isight(struct uvc_urb *uvc_urb, struct uvc_buffer *buf, for (i = 0; i < urb->number_of_packets; ++i) { if (urb->iso_frame_desc[i].status < 0) { - uvc_trace(stream->dev, UVC_TRACE_FRAME, - "USB isochronous frame lost (%d).\n", - urb->iso_frame_desc[i].status); + uvc_dbg(stream->dev, FRAME, + "USB isochronous frame lost (%d)\n", + urb->iso_frame_desc[i].status); } /* Decode the payload packet. |