[media] v4l2: export videobuf2 trace points
diff mbox

Message ID 1438070104-24084-1-git-send-email-p.zabel@pengutronix.de
State New
Headers show

Commit Message

Philipp Zabel July 28, 2015, 7:55 a.m. UTC
If videobuf2-core is built as a module, the vb2 trace points must be
exported from videodev.o to avoid errors when linking videobuf2-core.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Hans Verkuil July 28, 2015, 8:02 a.m. UTC | #1
On 07/28/2015 09:55 AM, Philipp Zabel wrote:
> If videobuf2-core is built as a module, the vb2 trace points must be
> exported from videodev.o to avoid errors when linking videobuf2-core.

I'm no tracepoint expert, so I'll just ask: if the tracepoint functionality
is disabled in the kernel, will this still compile OK?

That is, will the EXPORT_TRACEPOINT_SYMBOL_GPL() code disappear in that
case or will it point to absent code/data?

Regards,

	Hans

> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  drivers/media/v4l2-core/v4l2-ioctl.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index 85de455..e8b78ae 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -2784,3 +2784,8 @@ long video_ioctl2(struct file *file,
>  	return video_usercopy(file, cmd, arg, __video_do_ioctl);
>  }
>  EXPORT_SYMBOL(video_ioctl2);
> +
> +EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_buf_done);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_buf_queue);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_dqbuf);
> +EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_qbuf);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Philipp Zabel July 28, 2015, 8:15 a.m. UTC | #2
Am Dienstag, den 28.07.2015, 10:02 +0200 schrieb Hans Verkuil:
> On 07/28/2015 09:55 AM, Philipp Zabel wrote:
> > If videobuf2-core is built as a module, the vb2 trace points must be
> > exported from videodev.o to avoid errors when linking videobuf2-core.
> 
> I'm no tracepoint expert, so I'll just ask: if the tracepoint functionality
> is disabled in the kernel, will this still compile OK?
> 
> That is, will the EXPORT_TRACEPOINT_SYMBOL_GPL() code disappear in that
> case or will it point to absent code/data?

No traces left if CONFIG_TRACEPOINTS not set. include/linux/tracepoint.h
contains:

#ifdef CONFIG_TRACEPOINTS
#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)         \
        EXPORT_SYMBOL_GPL(__tracepoint_##name)
#else /* !CONFIG_TRACEPOINTS */
#define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
#endif

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 85de455..e8b78ae 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -2784,3 +2784,8 @@  long video_ioctl2(struct file *file,
 	return video_usercopy(file, cmd, arg, __video_do_ioctl);
 }
 EXPORT_SYMBOL(video_ioctl2);
+
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_buf_done);
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_buf_queue);
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_dqbuf);
+EXPORT_TRACEPOINT_SYMBOL_GPL(vb2_qbuf);