* [PATCH] ALSA: fix unused warnings with snd_power_get_state
@ 2010-10-16 17:24 Mike Frysinger
2010-10-17 8:15 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2010-10-16 17:24 UTC (permalink / raw)
To: alsa-devel, Takashi Iwai
If we compile the ASoC code with PM disabled, we hit stuff like:
sound/soc/soc-dapm.c: In function 'snd_soc_dapm_suspend_check':
sound/soc/soc-dapm.c:440: warning: unused variable 'codec'
So tweak the stub macro to avoid these issues.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/sound/core.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/sound/core.h b/include/sound/core.h
index 89e0ac1..c129f08 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -179,7 +179,7 @@ int snd_power_wait(struct snd_card *card, unsigned int power_state);
#define snd_power_lock(card) do { (void)(card); } while (0)
#define snd_power_unlock(card) do { (void)(card); } while (0)
static inline int snd_power_wait(struct snd_card *card, unsigned int state) { return 0; }
-#define snd_power_get_state(card) SNDRV_CTL_POWER_D0
+#define snd_power_get_state(card) ({ (void)(card); SNDRV_CTL_POWER_D0; })
#define snd_power_change_state(card, state) do { (void)(card); } while (0)
#endif /* CONFIG_PM */
--
1.7.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: fix unused warnings with snd_power_get_state
2010-10-16 17:24 [PATCH] ALSA: fix unused warnings with snd_power_get_state Mike Frysinger
@ 2010-10-17 8:15 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2010-10-17 8:15 UTC (permalink / raw)
To: Mike Frysinger; +Cc: alsa-devel
At Sat, 16 Oct 2010 13:24:52 -0400,
Mike Frysinger wrote:
>
> If we compile the ASoC code with PM disabled, we hit stuff like:
> sound/soc/soc-dapm.c: In function 'snd_soc_dapm_suspend_check':
> sound/soc/soc-dapm.c:440: warning: unused variable 'codec'
>
> So tweak the stub macro to avoid these issues.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Applied now. Thanks.
Takashi
> ---
> include/sound/core.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/sound/core.h b/include/sound/core.h
> index 89e0ac1..c129f08 100644
> --- a/include/sound/core.h
> +++ b/include/sound/core.h
> @@ -179,7 +179,7 @@ int snd_power_wait(struct snd_card *card, unsigned int power_state);
> #define snd_power_lock(card) do { (void)(card); } while (0)
> #define snd_power_unlock(card) do { (void)(card); } while (0)
> static inline int snd_power_wait(struct snd_card *card, unsigned int state) { return 0; }
> -#define snd_power_get_state(card) SNDRV_CTL_POWER_D0
> +#define snd_power_get_state(card) ({ (void)(card); SNDRV_CTL_POWER_D0; })
> #define snd_power_change_state(card, state) do { (void)(card); } while (0)
>
> #endif /* CONFIG_PM */
> --
> 1.7.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-17 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-16 17:24 [PATCH] ALSA: fix unused warnings with snd_power_get_state Mike Frysinger
2010-10-17 8:15 ` Takashi Iwai
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.