lkml.org 
[lkml]   [2018]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: typec: ucsi: fix tracepoint related build error
Date
The ucsi driver defines several tracepoints, but the header file with the
tracepoint definition trace.h is only conditionally built depending on
CONFIG_FTRACE.

This leads to the following build error with CONFIG_FTRACE=n and
CONFIG_TYPEC_UCSI=m:

ERROR: "__tracepoint_ucsi_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!
ERROR: "__tracepoint_ucsi_register_port" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!
ERROR: "__tracepoint_ucsi_notify" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!
ERROR: "__tracepoint_ucsi_reset_ppm" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!
ERROR: "__tracepoint_ucsi_run_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!
ERROR: "__tracepoint_ucsi_ack" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!
ERROR: "__tracepoint_ucsi_connector_change" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined!

With CONFIG_TYPEC_UCSI=y the build fails with several link errors.

Fix this by changing the Makefile to unconditionally build trace.o.
Tracepints are a runtime contruct and no other user of tracepoints depends
on CONFIG_FTRACE.

Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
drivers/usb/typec/ucsi/Makefile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/typec/ucsi/Makefile b/drivers/usb/typec/ucsi/Makefile
index b57891c1fd31..971befbbc2a8 100644
--- a/drivers/usb/typec/ucsi/Makefile
+++ b/drivers/usb/typec/ucsi/Makefile
@@ -3,8 +3,6 @@ CFLAGS_trace.o := -I$(src)

obj-$(CONFIG_TYPEC_UCSI) += typec_ucsi.o

-typec_ucsi-y := ucsi.o
-
-typec_ucsi-$(CONFIG_FTRACE) += trace.o
+typec_ucsi-y := ucsi.o trace.o

obj-$(CONFIG_UCSI_ACPI) += ucsi_acpi.o
--
2.16.3
\
 
 \ /
  Last update: 2018-04-09 10:05    [W:0.064 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site