]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/ca0132 - Optimize for non-PCI configuration
authorTakashi Iwai <tiwai@suse.de>
Fri, 9 Nov 2018 13:18:32 +0000 (14:18 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Nov 2018 08:42:39 +0000 (09:42 +0100)
commit4a48e0cadfe15acaf5918ff6cb340ae8644ba6d1
tree0a93eabe263f4d82a47c653e4057ca39f563fb2e
parent96117e0f160d73cf4ff6d00cf3b0aca61de5e3af
ALSA: hda/ca0132 - Optimize for non-PCI configuration

All the recent support of Creative boards and onboard audio depend on
PCI, but they can't be trimmed easily even if you build without
CONFIG_PCI, since the quirk is detected dynamically and the code has
many branches with the flag check like spec->quirk type or
spec->use_alt_functions.

This patch makes these checks static for CONFIG_PCI=n case so that the
compiler optimizes out.  The access to flags are replaced with macros
that are replaced with a static value for CONFIG_PCI=n.

The macros look slightly ugly for avoiding compiler warnings wrt
unused variables, and some additional default-case handlings for
another compiler warnings, but the rest are very straightforward
changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_ca0132.c