[lttng-dev] [PATCH 1/1] asoc.h: fix build with v3.17 kernel

nitin.a.kamble at intel.com nitin.a.kamble at intel.com
Thu Sep 25 20:12:43 EDT 2014


From: Nitin A Kamble <nitin.a.kamble at intel.com>

The snd_soc_codec structure has changed in the v3.17 kernel. Some
of the redundant fields have been removed. To be specific this commit
from the v3.17 kernel causes the build failure for lttng-modules.

|commit f4333203ec933f9272c90c7add01774ec2cf94d3
|Author: Lars-Peter Clausen <lars at metafoo.de>
|Date:   Mon Jun 16 18:13:02 2014 +0200
|
|    ASoC: Move name and id from CODEC/platform to component
|
|    The component struct already has a name and id field which are initialized to
|    the same values as the same fields in the CODEC and platform structs. So remove
|    them from the CODEC and platform structs and used the ones from the component
|    struct instead.
|
|    Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
|    Signed-off-by: Mark Brown <broonie at linaro.org>

The asoc.h is changed according to the change in the above kernel commit
to fix the lttng-modules build.

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
 instrumentation/events/lttng-module/asoc.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h
index 672bea4..19d25bf 100644
--- a/instrumentation/events/lttng-module/asoc.h
+++ b/instrumentation/events/lttng-module/asoc.h
@@ -32,15 +32,15 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
 	TP_ARGS(codec, reg, val),
 
 	TP_STRUCT__entry(
-		__string(	name,		codec->name	)
+		__string(	name,		codec->component.name	)
 		__field(	int,		id		)
 		__field(	unsigned int,	reg		)
 		__field(	unsigned int,	val		)
 	),
 
 	TP_fast_assign(
-		tp_strcpy(name, codec->name)
-		tp_assign(id, codec->id)
+		tp_strcpy(name, codec->component.name)
+		tp_assign(id, codec->component.id)
 		tp_assign(reg, reg)
 		tp_assign(val, val)
 	),
@@ -77,15 +77,15 @@ DECLARE_EVENT_CLASS(snd_soc_preg,
 	TP_ARGS(platform, reg, val),
 
 	TP_STRUCT__entry(
-		__string(	name,		platform->name	)
+		__string(	name,		platform->component.name	)
 		__field(	int,		id		)
 		__field(	unsigned int,	reg		)
 		__field(	unsigned int,	val		)
 	),
 
 	TP_fast_assign(
-		tp_strcpy(name, platform->name)
-		tp_assign(id, platform->id)
+		tp_strcpy(name, platform->component.name)
+		tp_assign(id, platform->component.id)
 		tp_assign(reg, reg)
 		tp_assign(val, val)
 	),
@@ -399,17 +399,17 @@ TRACE_EVENT(snd_soc_cache_sync,
 	TP_ARGS(codec, type, status),
 
 	TP_STRUCT__entry(
-		__string(	name,		codec->name	)
+		__string(	name,		codec->component.name	)
 		__string(	status,		status		)
 		__string(	type,		type		)
 		__field(	int,		id		)
 	),
 
 	TP_fast_assign(
-		tp_strcpy(name, codec->name)
+		tp_strcpy(name, codec->component.name)
 		tp_strcpy(status, status)
 		tp_strcpy(type, type)
-		tp_assign(id, codec->id)
+		tp_assign(id, codec->component.id)
 	),
 
 	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
-- 
1.8.1.4




More information about the lttng-dev mailing list