Title: [9220] trunk/include/sound/core.h: ALSA: fix unused warnings with snd_power_get_state
Revision
9220
Author
vapier
Date
2010-10-16 17:12:24 -0400 (Sat, 16 Oct 2010)

Log Message

ALSA: fix unused warnings with snd_power_get_state

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.

Modified Paths

Diff

Modified: trunk/include/sound/core.h (9219 => 9220)


--- trunk/include/sound/core.h	2010-10-16 21:12:00 UTC (rev 9219)
+++ trunk/include/sound/core.h	2010-10-16 21:12:24 UTC (rev 9220)
@@ -179,7 +179,7 @@
 #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 */
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to