Skip to content

Commit f0a220d

Browse files
dgreidtiwai
authored andcommitted
ALSA: core - Define snd_pci_quirk without CONFIG_PCI
The hda codecs all use this struct and, with an HDA platform driver, will be able to be built without PCI. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 154867c commit f0a220d

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎include/sound/core.h‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,6 @@ static inline void snd_printdd(const char *format, ...) {}
433433
#define gameport_get_port_data(gp) (gp)->port_data
434434
#endif
435435

436-
#ifdef CONFIG_PCI
437436
/* PCI quirk list helper */
438437
struct snd_pci_quirk {
439438
unsigned short subvendor; /* PCI subvendor ID */
@@ -469,12 +468,26 @@ struct snd_pci_quirk {
469468
#define snd_pci_quirk_name(q) ""
470469
#endif
471470

471+
#ifdef CONFIG_PCI
472472
const struct snd_pci_quirk *
473473
snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list);
474474

475475
const struct snd_pci_quirk *
476476
snd_pci_quirk_lookup_id(u16 vendor, u16 device,
477477
const struct snd_pci_quirk *list);
478+
#else
479+
static inline const struct snd_pci_quirk *
480+
snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list)
481+
{
482+
return NULL;
483+
}
484+
485+
static inline const struct snd_pci_quirk *
486+
snd_pci_quirk_lookup_id(u16 vendor, u16 device,
487+
const struct snd_pci_quirk *list)
488+
{
489+
return NULL;
490+
}
478491
#endif
479492

480493
#endif /* __SOUND_CORE_H */

0 commit comments

Comments
 (0)