diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-11-28 01:04:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-12-04 12:32:13 -0500 |
commit | 74c76497946e1f15b51d603735eb8273ac89381e (patch) | |
tree | 9a4e241ab5ae401e189418f74610982521bb9585 | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
ASoC: use snd_soc_component_init_regmap() on wm8400
To setup regmap, ALSA SoC has snd_soc_component_init_regmap() and
.get_regmap. But these are duplicated feature.
Let's use snd_soc_component_init_regmap() and remove .get_regmap
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/wm8400.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 6c59fb933bd6..a36adf881bca 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
@@ -1285,6 +1285,7 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec) | |||
1285 | if (priv == NULL) | 1285 | if (priv == NULL) |
1286 | return -ENOMEM; | 1286 | return -ENOMEM; |
1287 | 1287 | ||
1288 | snd_soc_codec_init_regmap(codec, wm8400->regmap); | ||
1288 | snd_soc_codec_set_drvdata(codec, priv); | 1289 | snd_soc_codec_set_drvdata(codec, priv); |
1289 | priv->wm8400 = wm8400; | 1290 | priv->wm8400 = wm8400; |
1290 | 1291 | ||
@@ -1325,17 +1326,9 @@ static int wm8400_codec_remove(struct snd_soc_codec *codec) | |||
1325 | return 0; | 1326 | return 0; |
1326 | } | 1327 | } |
1327 | 1328 | ||
1328 | static struct regmap *wm8400_get_regmap(struct device *dev) | ||
1329 | { | ||
1330 | struct wm8400 *wm8400 = dev_get_platdata(dev); | ||
1331 | |||
1332 | return wm8400->regmap; | ||
1333 | } | ||
1334 | |||
1335 | static const struct snd_soc_codec_driver soc_codec_dev_wm8400 = { | 1329 | static const struct snd_soc_codec_driver soc_codec_dev_wm8400 = { |
1336 | .probe = wm8400_codec_probe, | 1330 | .probe = wm8400_codec_probe, |
1337 | .remove = wm8400_codec_remove, | 1331 | .remove = wm8400_codec_remove, |
1338 | .get_regmap = wm8400_get_regmap, | ||
1339 | .set_bias_level = wm8400_set_bias_level, | 1332 | .set_bias_level = wm8400_set_bias_level, |
1340 | .suspend_bias_off = true, | 1333 | .suspend_bias_off = true, |
1341 | 1334 | ||