linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix tas_suspend/resume build warning
@ 2007-07-21 14:29 Stephen Rothwell
  2007-07-21 17:29 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2007-07-21 14:29 UTC (permalink / raw)
  To: johannes; +Cc: linuxppc-dev, alsa-devel, Andrew Morton


sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 sound/aoa/codecs/snd-aoa-codec-tas.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 2f771f5..3cbfe46 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
 	return 0;
 }
 
+#ifdef CONFIG_PM
 /* we are controlled via i2c and assume that is always up
  * If that wasn't the case, we'd have to suspend once
  * our i2c device is suspended, and then take note of that! */
@@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
 {
 	return tas_suspend(cii->codec_data);
@@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
 {
 	return tas_resume(cii->codec_data);
 }
-#endif
+#else /* CONFIG_PM */
+#define _tas_suspend	NULL
+#define _tas_resume	NULL
+#endif /* CONFIG_PM */
 
 static struct codec_info tas_codec_info = {
 	.transfers = tas_transfers,
@@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
 	.owner = THIS_MODULE,
 	.usable = tas_usable,
 	.switch_clock = tas_switch_clock,
-#ifdef CONFIG_PM
 	.suspend = _tas_suspend,
 	.resume = _tas_resume,
-#endif
 };
 
 static int tas_init_codec(struct aoa_codec *codec)
-- 
1.5.2.3

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

* Re: [PATCH] Fix tas_suspend/resume build warning
  2007-07-21 14:29 [PATCH] Fix tas_suspend/resume build warning Stephen Rothwell
@ 2007-07-21 17:29 ` Johannes Berg
  2007-07-21 23:55   ` Stephen Rothwell
  2007-07-23 10:11   ` Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: Johannes Berg @ 2007-07-21 17:29 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Takashi Iwai, linuxppc-dev, alsa-devel, Andrew Morton

On Sun, 2007-07-22 at 00:29 +1000, Stephen Rothwell wrote:
> sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
> sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used

Heh. I daresay I never compiled a kernel without PM. Not sure why you'd
want to, but still good to have it fixed. Thanks.


[full copy below for Takashi, I suppose it'll go through his tree]

From: Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Fix tas_suspend/resume build warning

sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
---
 sound/aoa/codecs/snd-aoa-codec-tas.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
index 2f771f5..3cbfe46 100644
--- a/sound/aoa/codecs/snd-aoa-codec-tas.c
+++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
@@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
 	return 0;
 }
 
+#ifdef CONFIG_PM
 /* we are controlled via i2c and assume that is always up
  * If that wasn't the case, we'd have to suspend once
  * our i2c device is suspended, and then take note of that! */
@@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
 	return 0;
 }
 
-#ifdef CONFIG_PM
 static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
 {
 	return tas_suspend(cii->codec_data);
@@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
 {
 	return tas_resume(cii->codec_data);
 }
-#endif
+#else /* CONFIG_PM */
+#define _tas_suspend	NULL
+#define _tas_resume	NULL
+#endif /* CONFIG_PM */
 
 static struct codec_info tas_codec_info = {
 	.transfers = tas_transfers,
@@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
 	.owner = THIS_MODULE,
 	.usable = tas_usable,
 	.switch_clock = tas_switch_clock,
-#ifdef CONFIG_PM
 	.suspend = _tas_suspend,
 	.resume = _tas_resume,
-#endif
 };
 
 static int tas_init_codec(struct aoa_codec *codec)

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

* Re: [PATCH] Fix tas_suspend/resume build warning
  2007-07-21 17:29 ` Johannes Berg
@ 2007-07-21 23:55   ` Stephen Rothwell
  2007-07-23 10:11   ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2007-07-21 23:55 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Takashi Iwai, linuxppc-dev, alsa-devel, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

On Sat, 21 Jul 2007 19:29:26 +0200 Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Sun, 2007-07-22 at 00:29 +1000, Stephen Rothwell wrote:
> > sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
> > sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used
> 
> Heh. I daresay I never compiled a kernel without PM. Not sure why you'd
> want to, but still good to have it fixed. Thanks.

Thats was a PowerPC ppc64_defconfig build.  Why that has CONFIG_PM not set is anyone's guess :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH] Fix tas_suspend/resume build warning
  2007-07-21 17:29 ` Johannes Berg
  2007-07-21 23:55   ` Stephen Rothwell
@ 2007-07-23 10:11   ` Takashi Iwai
  1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2007-07-23 10:11 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Stephen Rothwell, alsa-devel, Andrew Morton, linuxppc-dev

At Sat, 21 Jul 2007 19:29:26 +0200,
Johannes Berg wrote:
> 
> On Sun, 2007-07-22 at 00:29 +1000, Stephen Rothwell wrote:
> > sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
> > sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used
> 
> Heh. I daresay I never compiled a kernel without PM. Not sure why you'd
> want to, but still good to have it fixed. Thanks.
> 
> 
> [full copy below for Takashi, I suppose it'll go through his tree]

Thanks, I applied it to ALSA tree now.


Takashi

> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Subject: Fix tas_suspend/resume build warning
> 
> sound/aoa/codecs/snd-aoa-codec-tas.c:750: warning: 'tas_suspend' defined but not used
> sound/aoa/codecs/snd-aoa-codec-tas.c:760: warning: 'tas_resume' defined but not used
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>  sound/aoa/codecs/snd-aoa-codec-tas.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c
> index 2f771f5..3cbfe46 100644
> --- a/sound/aoa/codecs/snd-aoa-codec-tas.c
> +++ b/sound/aoa/codecs/snd-aoa-codec-tas.c
> @@ -743,6 +743,7 @@ static int tas_switch_clock(struct codec_info_item *cii, enum clock_switch clock
>  	return 0;
>  }
>  
> +#ifdef CONFIG_PM
>  /* we are controlled via i2c and assume that is always up
>   * If that wasn't the case, we'd have to suspend once
>   * our i2c device is suspended, and then take note of that! */
> @@ -768,7 +769,6 @@ static int tas_resume(struct tas *tas)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM
>  static int _tas_suspend(struct codec_info_item *cii, pm_message_t state)
>  {
>  	return tas_suspend(cii->codec_data);
> @@ -778,7 +778,10 @@ static int _tas_resume(struct codec_info_item *cii)
>  {
>  	return tas_resume(cii->codec_data);
>  }
> -#endif
> +#else /* CONFIG_PM */
> +#define _tas_suspend	NULL
> +#define _tas_resume	NULL
> +#endif /* CONFIG_PM */
>  
>  static struct codec_info tas_codec_info = {
>  	.transfers = tas_transfers,
> @@ -791,10 +794,8 @@ static struct codec_info tas_codec_info = {
>  	.owner = THIS_MODULE,
>  	.usable = tas_usable,
>  	.switch_clock = tas_switch_clock,
> -#ifdef CONFIG_PM
>  	.suspend = _tas_suspend,
>  	.resume = _tas_resume,
> -#endif
>  };
>  
>  static int tas_init_codec(struct aoa_codec *codec)
> 
> 

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

end of thread, other threads:[~2007-07-23 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-21 14:29 [PATCH] Fix tas_suspend/resume build warning Stephen Rothwell
2007-07-21 17:29 ` Johannes Berg
2007-07-21 23:55   ` Stephen Rothwell
2007-07-23 10:11   ` Takashi Iwai

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).