1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_TRACE_PWC_H) || defined(TRACE_HEADER_MULTI_READ)
6 #include <linux/tracepoint.h>
9 #define TRACE_SYSTEM pwc
11 TRACE_EVENT(pwc_handler_enter,
12 TP_PROTO(struct urb *urb, struct pwc_device *pdev),
15 __field(struct urb*, urb)
16 __field(struct pwc_frame_buf*, fbuf)
17 __field(int, urb__status)
18 __field(u32, urb__actual_length)
19 __field(int, fbuf__filled)
20 __string(name, pdev->v4l2_dev.name)
24 __entry->fbuf = pdev->fill_buf;
25 __entry->urb__status = urb->status;
26 __entry->urb__actual_length = urb->actual_length;
27 __entry->fbuf__filled = (pdev->fill_buf
28 ? pdev->fill_buf->filled : 0);
29 __assign_str(name, pdev->v4l2_dev.name);
31 TP_printk("dev=%s (fbuf=%p filled=%d) urb=%p (status=%d actual_length=%u)",
34 __entry->fbuf__filled,
37 __entry->urb__actual_length)
40 TRACE_EVENT(pwc_handler_exit,
41 TP_PROTO(struct urb *urb, struct pwc_device *pdev),
44 __field(struct urb*, urb)
45 __field(struct pwc_frame_buf*, fbuf)
46 __field(int, fbuf__filled)
47 __string(name, pdev->v4l2_dev.name)
51 __entry->fbuf = pdev->fill_buf;
52 __entry->fbuf__filled = pdev->fill_buf->filled;
53 __assign_str(name, pdev->v4l2_dev.name);
55 TP_printk(" dev=%s (fbuf=%p filled=%d) urb=%p",
58 __entry->fbuf__filled,
62 #endif /* _TRACE_PWC_H */
64 /* This part must be outside protection */
65 #include <trace/define_trace.h>