Message ID | 1420449508-10701-1-git-send-email-k.kozlowski@samsung.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2b730cc38d3ca592b4f9f71989e7f0c79b37b3b3 |
Headers | show |
On Mon, Jan 05, 2015 at 10:18:21AM +0100, Krzysztof Kozlowski wrote: > The regmap_config struct may be const because it is not modified by the > driver and regmap_init() accepts pointer to const. Make struct > snd_soc_codec_driver const as well (snd_soc_register_codec() accepts > pointer to const). Applied all, thanks.
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c index d1fdbc266631..07630260e1ba 100644 --- a/sound/soc/codecs/alc5632.c +++ b/sound/soc/codecs/alc5632.c @@ -1066,7 +1066,7 @@ static int alc5632_probe(struct snd_soc_codec *codec) return 0; } -static struct snd_soc_codec_driver soc_codec_device_alc5632 = { +static const struct snd_soc_codec_driver soc_codec_device_alc5632 = { .probe = alc5632_probe, .resume = alc5632_resume, .set_bias_level = alc5632_set_bias_level, @@ -1080,7 +1080,7 @@ static struct snd_soc_codec_driver soc_codec_device_alc5632 = { .num_dapm_routes = ARRAY_SIZE(alc5632_dapm_routes), }; -static struct regmap_config alc5632_regmap = { +static const struct regmap_config alc5632_regmap = { .reg_bits = 8, .val_bits = 16,
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Make struct snd_soc_codec_driver const as well (snd_soc_register_codec() accepts pointer to const). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> --- sound/soc/codecs/alc5632.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)