diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-03-20 07:35:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-20 07:50:59 -0400 |
commit | 9cd974bb0f7abc83da1788a17e28890819b593b8 (patch) | |
tree | 1a042cd3ec76d66c8e75dececdb9f434686b9c3d /sound/soc/codecs | |
parent | 718b25c803df8c1f8f2090c115911d123e34c78a (diff) |
ASoC: max98925: Constify regmap config and other codec data
Constify local structures (snd_soc_dai_ops, snd_soc_codec_driver,
regmap_config) and array (reg_defaults) which are not modified by the
driver and passed to core as pointer to const.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/max98925.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98925.c b/sound/soc/codecs/max98925.c index 1f8e80315749..0796dfaeb139 100644 --- a/sound/soc/codecs/max98925.c +++ b/sound/soc/codecs/max98925.c | |||
@@ -34,7 +34,7 @@ static const char *const hpf_text[] = { | |||
34 | "Disable", "DC Block", "100Hz", "200Hz", "400Hz", "800Hz", | 34 | "Disable", "DC Block", "100Hz", "200Hz", "400Hz", "800Hz", |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static struct reg_default max98925_reg[] = { | 37 | static const struct reg_default max98925_reg[] = { |
38 | { 0x0B, 0x00 }, /* IRQ Enable0 */ | 38 | { 0x0B, 0x00 }, /* IRQ Enable0 */ |
39 | { 0x0C, 0x00 }, /* IRQ Enable1 */ | 39 | { 0x0C, 0x00 }, /* IRQ Enable1 */ |
40 | { 0x0D, 0x00 }, /* IRQ Enable2 */ | 40 | { 0x0D, 0x00 }, /* IRQ Enable2 */ |
@@ -491,7 +491,7 @@ static int max98925_dai_set_sysclk(struct snd_soc_dai *dai, | |||
491 | #define MAX98925_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ | 491 | #define MAX98925_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ |
492 | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) | 492 | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) |
493 | 493 | ||
494 | static struct snd_soc_dai_ops max98925_dai_ops = { | 494 | static const struct snd_soc_dai_ops max98925_dai_ops = { |
495 | .set_sysclk = max98925_dai_set_sysclk, | 495 | .set_sysclk = max98925_dai_set_sysclk, |
496 | .set_fmt = max98925_dai_set_fmt, | 496 | .set_fmt = max98925_dai_set_fmt, |
497 | .hw_params = max98925_dai_hw_params, | 497 | .hw_params = max98925_dai_hw_params, |
@@ -541,7 +541,7 @@ static int max98925_probe(struct snd_soc_codec *codec) | |||
541 | return 0; | 541 | return 0; |
542 | } | 542 | } |
543 | 543 | ||
544 | static struct snd_soc_codec_driver soc_codec_dev_max98925 = { | 544 | static const struct snd_soc_codec_driver soc_codec_dev_max98925 = { |
545 | .probe = max98925_probe, | 545 | .probe = max98925_probe, |
546 | .controls = max98925_snd_controls, | 546 | .controls = max98925_snd_controls, |
547 | .num_controls = ARRAY_SIZE(max98925_snd_controls), | 547 | .num_controls = ARRAY_SIZE(max98925_snd_controls), |
@@ -551,7 +551,7 @@ static struct snd_soc_codec_driver soc_codec_dev_max98925 = { | |||
551 | .num_dapm_widgets = ARRAY_SIZE(max98925_dapm_widgets), | 551 | .num_dapm_widgets = ARRAY_SIZE(max98925_dapm_widgets), |
552 | }; | 552 | }; |
553 | 553 | ||
554 | static struct regmap_config max98925_regmap = { | 554 | static const struct regmap_config max98925_regmap = { |
555 | .reg_bits = 8, | 555 | .reg_bits = 8, |
556 | .val_bits = 8, | 556 | .val_bits = 8, |
557 | .max_register = MAX98925_REV_VERSION, | 557 | .max_register = MAX98925_REV_VERSION, |