All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime"
@ 2012-04-10 21:33 Fabio Estevam
  2012-04-10 21:34 ` Mark Brown
  2012-04-10 21:38 ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2012-04-10 21:33 UTC (permalink / raw)
  To: alsa-devel; +Cc: Fabio Estevam, broonie

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)

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

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 2603863..a154141 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -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);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime"
  2012-04-10 21:33 [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime" Fabio Estevam
@ 2012-04-10 21:34 ` Mark Brown
  2012-04-10 21:38 ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-04-10 21:34 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 346 bytes --]

On Tue, Apr 10, 2012 at 06:33:07PM -0300, Fabio Estevam wrote:
> 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?

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime"
  2012-04-10 21:33 [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime" Fabio Estevam
  2012-04-10 21:34 ` Mark Brown
@ 2012-04-10 21:38 ` Mark Brown
  2012-04-10 21:48   ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Brown @ 2012-04-10 21:38 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 803 bytes --]

On Tue, Apr 10, 2012 at 06:33:07PM -0300, Fabio Estevam wrote:
> 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.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime"
  2012-04-10 21:38 ` Mark Brown
@ 2012-04-10 21:48   ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2012-04-10 21:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel

On Tue, Apr 10, 2012 at 6:38 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Apr 10, 2012 at 06:33:07PM -0300, Fabio Estevam wrote:
>> 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.

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
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime"
  2012-04-10 21:29 Fabio Estevam
@ 2012-04-10 21:32 ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2012-04-10 21:32 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 334 bytes --]

On Tue, Apr 10, 2012 at 06:29:54PM -0300, Fabio Estevam wrote:
> 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)

No, fix the code to not rely on runtime.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime"
@ 2012-04-10 21:29 Fabio Estevam
  2012-04-10 21:32 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2012-04-10 21:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: Fabio Estevam, broonie

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)

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

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 2603863..a154141 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -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);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-10 21:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 21:33 [PATCH] ASoC: wm9712: Fix build due to missing definition of "runtime" Fabio Estevam
2012-04-10 21:34 ` Mark Brown
2012-04-10 21:38 ` Mark Brown
2012-04-10 21:48   ` Fabio Estevam
  -- strict thread matches above, loose matches on Subject: below --
2012-04-10 21:29 Fabio Estevam
2012-04-10 21:32 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.