alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: wm9712: Fix build due to removal of 'runtime' definition
@ 2012-04-10 22:12 Fabio Estevam
  0 siblings, 0 replies; only message in thread
From: Fabio Estevam @ 2012-04-10 22:12 UTC (permalink / raw)
  To: alsa-devel; +Cc: Fabio Estevam, broonie, 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 was caused by commit e6968a (ASoC: codecs: Remove rtd->codec usage from CODEC drivers),
which removed the 'struct snd_pcm_runtime *runtime = substream->runtime' definition.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
 sound/soc/codecs/wm9712.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 2603863..eee8170 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -479,7 +479,7 @@ static int ac97_prepare(struct snd_pcm_substream *substream,
 	else
 		reg = AC97_PCM_LR_ADC_RATE;
 
-	return ac97_write(codec, reg, runtime->rate);
+	return ac97_write(codec, reg, substream->runtime->rate);
 }
 
 static int ac97_aux_prepare(struct snd_pcm_substream *substream,
@@ -496,7 +496,8 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream,
 	if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
 		return -ENODEV;
 
-	return ac97_write(codec, AC97_PCM_SURR_DAC_RATE, runtime->rate);
+	return ac97_write(codec, AC97_PCM_SURR_DAC_RATE,
+					substream->runtime->rate);
 }
 
 #define WM9712_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-10 22:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10 22:12 [PATCH v2] ASoC: wm9712: Fix build due to removal of 'runtime' definition Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).