Skip to contentSkip to conversation

ASoC: wm9712: Fix build due to missing definition of "runtime"

PATCH Superseded Fabio Estevam 2 participants 4 messages Apr 10, 2012

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm9712: Fix build due to missing definition of "runtime"

Fix the following build error:

sound/soc/codecs/wm9712.c:482:32: error: 'runtime' undeclared (first use in this function) sound/soc/codecs/wm9712.c:499:33: error: 'runtime' undeclared (first use in this function)

---
 sound/soc/codecs/wm9712.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
sound/soc/codecs/wm9712.c +2 -0
index 2603863..a154141 100644
@@ -470,6 +470,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream,
 	struct snd_soc_codec *codec = dai->codec;
 	int reg;
 	u16 vra;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	vra = ac97_read(codec, AC97_EXTENDED_STATUS);
 	ac97_write(codec, AC97_EXTENDED_STATUS, vra | 0x1);
@@ -487,6 +488,7 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream,
 {
 	struct snd_soc_codec *codec = dai->codec;
 	u16 vra, xsle;
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	vra = ac97_read(codec, AC97_EXTENDED_STATUS);
 	ac97_write(codec, AC97_EXTENDED_STATUS, vra | 0x1);
Signature · 1 line
1.7.1
#1 lore raw
Quoted 4 lines · Fabio Estevam

Fix the following build error:

sound/soc/codecs/wm9712.c:482:32: error: 'runtime' undeclared (first use in this function) sound/soc/codecs/wm9712.c:499:33: error: 'runtime' undeclared (first use in this function)

This appears to be identical to your previous patch?

#2 lore raw
In reply to Fabio Estevam
Quoted 4 lines · Fabio Estevam

Fix the following build error:

sound/soc/codecs/wm9712.c:482:32: error: 'runtime' undeclared (first use in this function) sound/soc/codecs/wm9712.c:499:33: error: 'runtime' undeclared (first use in this function)

On second thoughts looking at what the setting is being used for applied... the code is rather odd here, though.

In general changes like this which make no attempt to understand what they're changing are a bad idea - don't just cut'n'paste some errors into your changelog, explain what's gone wrong and why. It's like when people just initialise a variable to some random value to shut a warning up without understanding why, the fact that the error goes away doesn't mean that the fix is sensible.

#3 lore raw
Quoted 9 lines · Mark Brown
Quoted 4 lines · Fabio Estevam

Fix the following build error:

sound/soc/codecs/wm9712.c:482:32: error: 'runtime' undeclared (first use in this function) sound/soc/codecs/wm9712.c:499:33: error: 'runtime' undeclared (first use in this function)

On second thoughts looking at what the setting is being used for applied...  the code is rather odd here, though.

Quoted 6 lines

In general changes like this which make no attempt to understand what they're changing are a bad idea - don't just cut'n'paste some errors into your changelog, explain what's gone wrong and why.  It's like when people just initialise a variable to some random value to shut a warning up without understanding why, the fact that the error goes away doesn't mean that the fix is sensible.

Ok, this is currently breaking imx_v4_v5_defconfig in linux-next and would like to get it fixed.

I will try to understand this breakage better.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel