bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0673-ASoC-bcm-allo-piano-dac-plus-Remove-unnecessary-cons.patch
1 From fb7adf252e4813f86d2871448a0bdb586bfcd1f1 Mon Sep 17 00:00:00 2001
2 From: Nathan Chancellor <nathan@kernel.org>
3 Date: Mon, 31 Jan 2022 17:20:55 -0700
4 Subject: [PATCH] ASoC: bcm: allo-piano-dac-plus: Remove unnecessary
5 const specifiers
6
7 Clang warns:
8
9 sound/soc/bcm/allo-piano-dac-plus.c:66:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
10 static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum,
11 ^
12 ./include/sound/soc.h:355:2: note: expanded from macro 'SOC_ENUM_SINGLE_DECL'
13 SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
14 ^
15 ./include/sound/soc.h:352:2: note: expanded from macro 'SOC_ENUM_DOUBLE_DECL'
16 const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
17 ^
18 sound/soc/bcm/allo-piano-dac-plus.c:75:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
19 static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum,
20 ^
21 ./include/sound/soc.h:355:2: note: expanded from macro 'SOC_ENUM_SINGLE_DECL'
22 SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
23 ^
24 ./include/sound/soc.h:352:2: note: expanded from macro 'SOC_ENUM_DOUBLE_DECL'
25 const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
26 ^
27 sound/soc/bcm/allo-piano-dac-plus.c:96:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
28 static const SOC_ENUM_SINGLE_DECL(allo_piano_enum,
29 ^
30 ./include/sound/soc.h:355:2: note: expanded from macro 'SOC_ENUM_SINGLE_DECL'
31 SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
32 ^
33 ./include/sound/soc.h:352:2: note: expanded from macro 'SOC_ENUM_DOUBLE_DECL'
34 const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
35 ^
36 3 warnings generated.
37
38 SOC_VALUE_ENUM_DOUBLE_DECL already has a const specifier. Remove the duplicate
39 const specifiers to clean up the warnings.
40
41 Fixes: 42444979e710 ("Add support for all the downstream rpi sound card drivers")
42 Signed-off-by: Nathan Chancellor <nathan@kernel.org>
43 ---
44 sound/soc/bcm/allo-piano-dac-plus.c | 6 +++---
45 1 file changed, 3 insertions(+), 3 deletions(-)
46
47 --- a/sound/soc/bcm/allo-piano-dac-plus.c
48 +++ b/sound/soc/bcm/allo-piano-dac-plus.c
49 @@ -63,7 +63,7 @@ static const char * const allo_piano_mod
50 "2.2",
51 };
52
53 -static const SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum,
54 +static SOC_ENUM_SINGLE_DECL(allo_piano_mode_enum,
55 0, 0, allo_piano_mode_texts);
56
57 static const char * const allo_piano_dual_mode_texts[] = {
58 @@ -72,7 +72,7 @@ static const char * const allo_piano_dua
59 "Dual-Stereo",
60 };
61
62 -static const SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum,
63 +static SOC_ENUM_SINGLE_DECL(allo_piano_dual_mode_enum,
64 0, 0, allo_piano_dual_mode_texts);
65
66 static const char * const allo_piano_dsp_low_pass_texts[] = {
67 @@ -93,7 +93,7 @@ static const char * const allo_piano_dsp
68 "200",
69 };
70
71 -static const SOC_ENUM_SINGLE_DECL(allo_piano_enum,
72 +static SOC_ENUM_SINGLE_DECL(allo_piano_enum,
73 0, 0, allo_piano_dsp_low_pass_texts);
74
75 static int __snd_allo_piano_dsp_program(struct snd_soc_pcm_runtime *rtd,