* [PATCH v2] ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_* functions
@ 2012-01-30 9:10 Axel Lin
2012-01-30 9:18 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-01-30 9:10 UTC (permalink / raw)
To: alsa-devel; +Cc: Takashi Iwai
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
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
v2:
begin the ifdef including the definition of struct snd_pci_quirk.
include/sound/core.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/sound/core.h b/include/sound/core.h
index 5ab255f..cea1b54 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -417,6 +417,7 @@ static inline int __snd_bug_on(int cond)
#define gameport_get_port_data(gp) (gp)->port_data
#endif
+#ifdef CONFIG_PCI
/* PCI quirk list helper */
struct snd_pci_quirk {
unsigned short subvendor; /* PCI subvendor ID */
@@ -456,5 +457,6 @@ 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 */
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_* functions
2012-01-30 9:10 [PATCH v2] ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_* functions Axel Lin
@ 2012-01-30 9:18 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2012-01-30 9:18 UTC (permalink / raw)
To: Axel Lin; +Cc: alsa-devel
At Mon, 30 Jan 2012 17:10:58 +0800,
Axel Lin wrote:
>
> 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
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Thanks, applied now.
Takashi
> ---
> v2:
> begin the ifdef including the definition of struct snd_pci_quirk.
>
> include/sound/core.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/include/sound/core.h b/include/sound/core.h
> index 5ab255f..cea1b54 100644
> --- a/include/sound/core.h
> +++ b/include/sound/core.h
> @@ -417,6 +417,7 @@ static inline int __snd_bug_on(int cond)
> #define gameport_get_port_data(gp) (gp)->port_data
> #endif
>
> +#ifdef CONFIG_PCI
> /* PCI quirk list helper */
> struct snd_pci_quirk {
> unsigned short subvendor; /* PCI subvendor ID */
> @@ -456,5 +457,6 @@ 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 */
> --
> 1.7.5.4
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-30 9:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 9:10 [PATCH v2] ALSA: Add #ifdef CONFIG_PCI guard for snd_pci_quirk_* functions Axel Lin
2012-01-30 9:18 ` 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.