ASoC: Staticise and constify cs42l73_reg_defaults
Subsystems (3)
PATCH 1/1 ASoC: Staticise and constify cs42l73_reg_defaults
It's not exported and doesn't need to change.
Signed-off-by Mark Brown <[email protected]>
--- sound/soc/codecs/cs42l73.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/cs42l73.c +1 -1
@@ -42,7 +42,7 @@ struct cs42l73_private {u32 mclk; }; -struct reg_default cs42l73_reg_defaults[] = { +static const struct reg_default cs42l73_reg_defaults[] = { {1 ,0x42 },/* r01 - Device ID A&B */ {2 ,0xA7 },/* r02 - Device ID C&D */ {3 ,0x30 },/* r03 - Device ID E */
Signature · 1 line
1.7.7.3
Quoted 5 lines
sound/soc/codecs/cs42l73.c +1
-1-struct reg_default cs42l73_reg_defaults[] = { +static const struct reg_default cs42l73_reg_defaults[] = {{ 1, 0x42 }, /* r01 - Device ID A&B */ { 2, 0xA7 }, /* r02 - Device ID C&D */ { 3, 0x30 }, /* r03 - Device ID E */
Shouldn't this require struct reg_default *reg_defaults; be const as well?
sound/soc/codecs/cs42l73.c:1327: warning: initialization discards qualifiers from pointer target type
Or not use const?
-Brian
Quoted 5 lines · Brian Austin
Shouldn't this require struct
reg_default*reg_defaults; be const as well?
sound/soc/codecs/cs42l73.c:1327: warning: initialization discards qualifiers from pointer target type
It'll all be fine in -next, the regmap header has changed there.
Quoted 4 lines
It'll all be fine in -next, the regmap header has changed there.
OK
Thanks