Skip to contentSkip to conversation

ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_lookup* functions

PATCH Superseded Axel Lin 2 participants 2 messages Jan 30, 2012 Sound

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_lookup* functions

This fixes below build warning when CONFIG_PCI is not set.

CC sound/sound_core.o
In file included from sound/sound_core.c:15:
include/sound/core.h:454: warning: 'struct pci_dev' declared inside parameter list include/sound/core.h:454: warning: its scope is only this definition or declaration, which is probably not what you want

---
 include/sound/core.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/sound/core.h +2 -0
index 5ab255f..fce4b6f 100644
@@ -450,11 +450,13 @@ struct snd_pci_quirk {
 	{_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)}
 #endif
 
+#ifdef CONFIG_PCI
 const struct snd_pci_quirk *
 snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list);
 
 const struct snd_pci_quirk *
 snd_pci_quirk_lookup_id(u16 vendor, u16 device,
 			const struct snd_pci_quirk *list);
+#endif
 
 #endif /* __SOUND_CORE_H */
Signature · 1 line
1.7.5.4
#1 lore raw

At Mon, 30 Jan 2012 14:03:30 +0800,

Quoted 18 lines · Axel Lin

This fixes below build warning when CONFIG_PCI is not set.

CC sound/sound_core.o
In file included from sound/sound_core.c:15:
include/sound/core.h:454: warning: 'struct pci_dev' declared inside parameter list include/sound/core.h:454: warning: its scope is only this definition or declaration, which is probably not what you want

---
 include/sound/core.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/sound/core.h +0 -0
index 5ab255f..fce4b6f 100644

include/sound/core.h struct snd_pci_quirk { · line 453

Quoted 4 lines
include/sound/core.h +1 -0
@@ -450,11 +450,13 @@ struct snd_pci_quirk {
 	{_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)}
 #endif
 
+#ifdef CONFIG_PCI

I'd begin the ifdef including the definition of struct snd_pci_quirk. Could you revise the patch?

thanks,

Takashi