diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2020-12-23 14:35:26 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-27 15:07:27 +0100 |
commit | ed4c5fa4d804f57fa820d8ef8d3054be2ed13bea (patch) | |
tree | 3c3c6ed9171be2df8b108c3621fe4a155d685c55 /drivers/media/usb/uvc/uvc_status.c | |
parent | 59e92bf62771a5ff276f1c845c7b59d812d1dc8a (diff) | |
download | linux-stable-ed4c5fa4d804f57fa820d8ef8d3054be2ed13bea.tar.gz linux-stable-ed4c5fa4d804f57fa820d8ef8d3054be2ed13bea.tar.bz2 linux-stable-ed4c5fa4d804f57fa820d8ef8d3054be2ed13bea.zip |
media: uvcvideo: use dev_printk() for uvc_trace()
Instead of calling prink() inside uvc_trace, use dev_printk(), which adds
context to the output.
Now that we are at it, regroup the strings so the messages can be easily
"grepable".
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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/uvc_status.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_status.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/usb/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c index 4999fa585844..69434273d2c5 100644 --- a/drivers/media/usb/uvc/uvc_status.c +++ b/drivers/media/usb/uvc/uvc_status.c @@ -93,20 +93,20 @@ static void uvc_event_streaming(struct uvc_device *dev, struct uvc_streaming_status *status, int len) { if (len < 3) { - uvc_trace(UVC_TRACE_STATUS, "Invalid streaming status event " - "received.\n"); + uvc_trace(dev, UVC_TRACE_STATUS, + "Invalid streaming status event received.\n"); return; } if (status->bEvent == 0) { if (len < 4) return; - uvc_trace(UVC_TRACE_STATUS, "Button (intf %u) %s len %d\n", + uvc_trace(dev, UVC_TRACE_STATUS, "Button (intf %u) %s len %d\n", status->bOriginator, status->bValue[0] ? "pressed" : "released", len); uvc_input_report_key(dev, KEY_CAMERA, status->bValue[0]); } else { - uvc_trace(UVC_TRACE_STATUS, + uvc_trace(dev, UVC_TRACE_STATUS, "Stream %u error event %02x len %d.\n", status->bOriginator, status->bEvent, len); } @@ -163,12 +163,12 @@ static bool uvc_event_control(struct urb *urb, if (len < 6 || status->bEvent != 0 || status->bAttribute >= ARRAY_SIZE(attrs)) { - uvc_trace(UVC_TRACE_STATUS, "Invalid control status event " - "received.\n"); + uvc_trace(dev, UVC_TRACE_STATUS, + "Invalid control status event received.\n"); return false; } - uvc_trace(UVC_TRACE_STATUS, "Control %u/%u %s change len %d.\n", + uvc_trace(dev, UVC_TRACE_STATUS, "Control %u/%u %s change len %d.\n", status->bOriginator, status->bSelector, attrs[status->bAttribute], len); @@ -237,8 +237,9 @@ static void uvc_status_complete(struct urb *urb) } default: - uvc_trace(UVC_TRACE_STATUS, "Unknown status event " - "type %u.\n", dev->status[0]); + uvc_trace(dev, UVC_TRACE_STATUS, + "Unknown status event type %u.\n", + dev->status[0]); break; } } |