]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/asoc-davinci-mcasp-fix-clang-warning-without-config_.patch
drop drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch from 4.4.y and 4.9.y
[thirdparty/kernel/stable-queue.git] / queue-4.4 / asoc-davinci-mcasp-fix-clang-warning-without-config_.patch
1 From 67f2ab0d67073224b706a8edf0a3efb8fd4a38f7 Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Thu, 7 Mar 2019 11:11:30 +0100
4 Subject: ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM
5
6 [ Upstream commit 8ca5104715cfd14254ea5aecc390ae583b707607 ]
7
8 Building with clang shows a variable that is only used by the
9 suspend/resume functions but defined outside of their #ifdef block:
10
11 sound/soc/ti/davinci-mcasp.c:48:12: error: variable 'context_regs' is not needed and will not be emitted
12
13 We commonly fix these by marking the PM functions as __maybe_unused,
14 but here that would grow the davinci_mcasp structure, so instead
15 add another #ifdef here.
16
17 Fixes: 1cc0c054f380 ("ASoC: davinci-mcasp: Convert the context save/restore to use array")
18 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
19 Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
20 Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
21 Signed-off-by: Mark Brown <broonie@kernel.org>
22 Signed-off-by: Sasha Levin <sashal@kernel.org>
23 ---
24 sound/soc/davinci/davinci-mcasp.c | 2 ++
25 1 file changed, 2 insertions(+)
26
27 diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
28 index 2ccb8bccc9d4c..512ec25c9ead1 100644
29 --- a/sound/soc/davinci/davinci-mcasp.c
30 +++ b/sound/soc/davinci/davinci-mcasp.c
31 @@ -43,6 +43,7 @@
32
33 #define MCASP_MAX_AFIFO_DEPTH 64
34
35 +#ifdef CONFIG_PM
36 static u32 context_regs[] = {
37 DAVINCI_MCASP_TXFMCTL_REG,
38 DAVINCI_MCASP_RXFMCTL_REG,
39 @@ -65,6 +66,7 @@ struct davinci_mcasp_context {
40 u32 *xrsr_regs; /* for serializer configuration */
41 bool pm_state;
42 };
43 +#endif
44
45 struct davinci_mcasp_ruledata {
46 struct davinci_mcasp *mcasp;
47 --
48 2.20.1
49