* [PATCH] ALSA: hda: fix tegra build
@ 2014-05-26 16:14 Arnd Bergmann
2014-05-26 16:31 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2014-05-26 16:14 UTC (permalink / raw)
To: Takashi Iwai, Dylan Reid, Stephen Warren, Jaroslav Kysela,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
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: Dylan Reid <dgreid-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Reviewed-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 086fd06..a366ba9 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -77,10 +77,14 @@ struct hda_tegra {
void __iomem *regs;
};
+#ifdef CONFIG_PM
static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
module_param(power_save, bint, 0644);
MODULE_PARM_DESC(power_save,
"Automatic power-saving timeout (in seconds, 0 = disable).");
+#else
+static int power_save = 0;
+#endif
/*
* DMA page allocation ops.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda: fix tegra build
2014-05-26 16:14 [PATCH] ALSA: hda: fix tegra build Arnd Bergmann
@ 2014-05-26 16:31 ` Takashi Iwai
[not found] ` <s5h61ksjybu.wl%tiwai-l3A5Bk7waGM@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2014-05-26 16:31 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Dylan Reid, Stephen Warren, Jaroslav Kysela,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
At Mon, 26 May 2014 18:14:21 +0200,
Arnd Bergmann wrote:
>
> 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: Dylan Reid <dgreid-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Reviewed-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
Oh, you cloned me?
Takashi
> diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
> index 086fd06..a366ba9 100644
> --- a/sound/pci/hda/hda_tegra.c
> +++ b/sound/pci/hda/hda_tegra.c
> @@ -77,10 +77,14 @@ struct hda_tegra {
> void __iomem *regs;
> };
>
> +#ifdef CONFIG_PM
> static int power_save = CONFIG_SND_HDA_POWER_SAVE_DEFAULT;
> module_param(power_save, bint, 0644);
> MODULE_PARM_DESC(power_save,
> "Automatic power-saving timeout (in seconds, 0 = disable).");
> +#else
> +static int power_save = 0;
> +#endif
>
> /*
> * DMA page allocation ops.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda: fix tegra build
[not found] ` <s5h61ksjybu.wl%tiwai-l3A5Bk7waGM@public.gmane.org>
@ 2014-05-26 19:10 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2014-05-26 19:10 UTC (permalink / raw)
To: Takashi Iwai
Cc: Dylan Reid, Stephen Warren, Jaroslav Kysela,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Monday 26 May 2014, Takashi Iwai wrote:
> At Mon, 26 May 2014 18:14:21 +0200,
> Arnd Bergmann wrote:
> >
> > 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: Dylan Reid <dgreid-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > Reviewed-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
>
> Oh, you cloned me?
>
Damn, copy-paste error on my side. All three are wrong and should be Cc:,
also my Signed-off-by is missing.
Let me resend.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-26 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 16:14 [PATCH] ALSA: hda: fix tegra build Arnd Bergmann
2014-05-26 16:31 ` Takashi Iwai
[not found] ` <s5h61ksjybu.wl%tiwai-l3A5Bk7waGM@public.gmane.org>
2014-05-26 19:10 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).