diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-11-28 01:04:45 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-12-04 12:36:55 -0500 |
commit | 893d7cbea2fa259573e4ba36075e74f489f6dd28 (patch) | |
tree | cdcd4954b4d747546d4ada920564dc2c4f51213e | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
ASoC: use snd_soc_component_init_regmap() on wm5110
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/wm5110.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 6ed1e1f9ce51..fb0cf9c61f48 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -2280,9 +2280,11 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) | |||
2280 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); | 2280 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); |
2281 | struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); | 2281 | struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); |
2282 | struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); | 2282 | struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); |
2283 | struct arizona *arizona = priv->core.arizona; | ||
2283 | int i, ret; | 2284 | int i, ret; |
2284 | 2285 | ||
2285 | priv->core.arizona->dapm = dapm; | 2286 | arizona->dapm = dapm; |
2287 | snd_soc_codec_init_regmap(codec, arizona->regmap); | ||
2286 | 2288 | ||
2287 | ret = arizona_init_spk(codec); | 2289 | ret = arizona_init_spk(codec); |
2288 | if (ret < 0) | 2290 | if (ret < 0) |
@@ -2344,17 +2346,9 @@ static unsigned int wm5110_digital_vu[] = { | |||
2344 | ARIZONA_DAC_DIGITAL_VOLUME_6R, | 2346 | ARIZONA_DAC_DIGITAL_VOLUME_6R, |
2345 | }; | 2347 | }; |
2346 | 2348 | ||
2347 | static struct regmap *wm5110_get_regmap(struct device *dev) | ||
2348 | { | ||
2349 | struct wm5110_priv *priv = dev_get_drvdata(dev); | ||
2350 | |||
2351 | return priv->core.arizona->regmap; | ||
2352 | } | ||
2353 | |||
2354 | static const struct snd_soc_codec_driver soc_codec_dev_wm5110 = { | 2349 | static const struct snd_soc_codec_driver soc_codec_dev_wm5110 = { |
2355 | .probe = wm5110_codec_probe, | 2350 | .probe = wm5110_codec_probe, |
2356 | .remove = wm5110_codec_remove, | 2351 | .remove = wm5110_codec_remove, |
2357 | .get_regmap = wm5110_get_regmap, | ||
2358 | 2352 | ||
2359 | .idle_bias_off = true, | 2353 | .idle_bias_off = true, |
2360 | 2354 | ||