Skip to contentSkip to conversation

ASoC: core: Split the union for CODEC/platform in the DAI

PATCH In review Mark Brown 2 participants 2 messages Mar 2, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: core: Split the union for CODEC/platform in the DAI

There's now core code which falls back to global CODEC operations for DAI calls that needs to be able to tell if it's dealing with a CPU or CODEC DAI and given the small number of DAIs in a typical system and overall memory usage pattern saving a pointer per DAI is really not worth the effort.

---
 include/sound/soc-dai.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
include/sound/soc-dai.h +3 -4
index d474128..868f4b6 100644
@@ -250,10 +250,9 @@ struct snd_soc_dai {
 	unsigned int rate;
 
 	/* parent platform/codec */
-	union {
-		struct snd_soc_platform *platform;
-		struct snd_soc_codec *codec;
-	};
+	struct snd_soc_platform *platform;
+	struct snd_soc_codec *codec;
+
 	struct snd_soc_card *card;
 
 	struct list_head list;
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Mark Brown

There's now core code which falls back to global CODEC operations for DAI calls that needs to be able to tell if it's dealing with a CPU or CODEC DAI and given the small number of DAIs in a typical system and overall memory usage pattern saving a pointer per DAI is really not worth the effort.

---