[Sound-open-firmware] [PATCH] Don't call dma_trace_init_complete if dma trace is disabled.

Mike Mason michael.w.mason at intel.com
Fri Mar 16 02:31:30 CET 2018


Hide dma_trace_init_complete if --disable-dma-trace was passed
to configure. Otherwise, the compile with fail.

Signed-off-by: Mike Mason <michael.w.mason at intel.com>
---
 src/platform/apollolake/platform.c | 2 ++
 src/platform/baytrail/platform.c   | 2 ++
 src/platform/cannonlake/platform.c | 2 ++
 src/platform/haswell/platform.c    | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/src/platform/apollolake/platform.c b/src/platform/apollolake/platform.c
index 84f8e71..f601961 100644
--- a/src/platform/apollolake/platform.c
+++ b/src/platform/apollolake/platform.c
@@ -263,7 +263,9 @@ int platform_init(struct reef *reef)
 	}
 
 	/* Initialize DMA for Trace*/
+#if defined(CONFIG_DMA_TRACE)
 	dma_trace_init_complete(reef->dmat);
+#endif
 
 	return 0;
 }
diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c
index cec8297..658ae35 100644
--- a/src/platform/baytrail/platform.c
+++ b/src/platform/baytrail/platform.c
@@ -407,7 +407,9 @@ int platform_init(struct reef *reef)
 #endif
 
 	/* Initialize DMA for Trace*/
+#if defined(CONFIG_DMA_TRACE)
 	dma_trace_init_complete(reef->dmat);
+#endif
 
 	return 0;
 }
diff --git a/src/platform/cannonlake/platform.c b/src/platform/cannonlake/platform.c
index 8bf2d7a..28643e0 100644
--- a/src/platform/cannonlake/platform.c
+++ b/src/platform/cannonlake/platform.c
@@ -284,7 +284,9 @@ int platform_init(struct reef *reef)
 	}
 
 	/* Initialize DMA for Trace*/
+#if defined(CONFIG_DMA_TRACE)
 	dma_trace_init_complete(reef->dmat);
+#endif
 
 	return 0;
 }
diff --git a/src/platform/haswell/platform.c b/src/platform/haswell/platform.c
index f84d6e3..569c80a 100644
--- a/src/platform/haswell/platform.c
+++ b/src/platform/haswell/platform.c
@@ -284,7 +284,9 @@ int platform_init(struct reef *reef)
 	dai_probe(ssp1);
 
 	/* Initialize DMA for Trace*/
+#if defined(CONFIG_DMA_TRACE)
 	dma_trace_init_complete(reef->dmat);
+#endif
 
 	return 0;
 }
-- 
2.16.2



More information about the Sound-open-firmware mailing list