diff mbox series

[5/7] ASoC: SOF: Intel: move tracepoint creation

Message ID 20240503135221.229202-6-pierre-louis.bossart@linux.intel.com
State Accepted
Commit 136b37369cc4f044139b886133f3b9a721ecacd1
Headers show
Series ASoC: SOF: Intel: remove circular dependency for SoundWire BPT | expand

Commit Message

Pierre-Louis Bossart May 3, 2024, 1:52 p.m. UTC
CREATE_TRACEPOINTS is supposed to be used once. To avoid modpost
issues when creating modules, let's move the tracepoint creation in a
single object file.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/intel/Makefile      | 2 +-
 sound/soc/sof/intel/hda.c         | 1 -
 sound/soc/sof/intel/tracepoints.c | 3 +++
 3 files changed, 4 insertions(+), 2 deletions(-)
 create mode 100644 sound/soc/sof/intel/tracepoints.c
diff mbox series

Patch

diff --git a/sound/soc/sof/intel/Makefile b/sound/soc/sof/intel/Makefile
index c895bae0efdd..cf74548f87ad 100644
--- a/sound/soc/sof/intel/Makefile
+++ b/sound/soc/sof/intel/Makefile
@@ -7,7 +7,7 @@  snd-sof-intel-hda-common-objs := hda.o hda-loader.o hda-stream.o hda-trace.o \
 				 hda-dsp.o hda-ipc.o hda-ctrl.o hda-pcm.o \
 				 hda-dai.o hda-dai-ops.o hda-bus.o \
 				 hda-common-ops.o \
-				 telemetry.o
+				 telemetry.o tracepoints.o
 
 snd-sof-intel-hda-mlink-objs := hda-mlink.o
 
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index a6d16314879f..b15b1f5edcea 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -35,7 +35,6 @@ 
 #include "../ipc4-topology.h"
 #include "hda.h"
 
-#define CREATE_TRACE_POINTS
 #include <trace/events/sof_intel.h>
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
diff --git a/sound/soc/sof/intel/tracepoints.c b/sound/soc/sof/intel/tracepoints.c
new file mode 100644
index 000000000000..c223c96fe0e3
--- /dev/null
+++ b/sound/soc/sof/intel/tracepoints.c
@@ -0,0 +1,3 @@ 
+// SPDX-License-Identifier: GPL-2.0
+#define CREATE_TRACE_POINTS
+#include <trace/events/sof_intel.h>