[alsa-devel] [PATCH] ASoC: Staticise and constify cs42l73_reg_defaults
It's not exported and doesn't need to change.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- sound/soc/codecs/cs42l73.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 5544f14..2b294a9 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -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 */
-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
On Mon, Nov 28, 2011 at 03:26:53PM -0600, Brian Austin wrote:
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.
participants (2)
-
Brian Austin
-
Mark Brown