Commit 16c23952 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Takashi Iwai

ALSA: hda: fix tegra build

When CONFIG_PM is disabled, the CONFIG_SND_HDA_POWER_SAVE_DEFAULT symbol
does not get defined, which causes a build error for the hda-tegra driver:

hda/hda_tegra.c:80:25: error: 'CONFIG_SND_HDA_POWER_SAVE_DEFAULT' undeclared here (not in a function)
 static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
                         ^
/git/arm-soc/sound/pci/hda/hda_tegra.c:235:13: warning: 'hda_tegra_disable_clocks' defined but not used [-Wunused-function]
 static void hda_tegra_disable_clocks(struct hda_tegra *data)
             ^

This works around the problem by not referencing that macro
when CONFIG_PM is disabled. Instead, we assume that it's disabled
unconditionally and cannot be enabled at runtime.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Dylan Reid <dgreid@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 033b0a7c
...@@ -77,10 +77,14 @@ struct hda_tegra { ...@@ -77,10 +77,14 @@ struct hda_tegra {
void __iomem *regs; void __iomem *regs;
}; };
#ifdef CONFIG_PM
static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT; static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
module_param(power_save, bint, 0644); module_param(power_save, bint, 0644);
MODULE_PARM_DESC(power_save, MODULE_PARM_DESC(power_save,
"Automatic power-saving timeout (in seconds, 0 = disable)."); "Automatic power-saving timeout (in seconds, 0 = disable).");
#else
static int power_save = 0;
#endif
/* /*
* DMA page allocation ops. * DMA page allocation ops.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment