ASoC: use snd_soc_component_init_regmap() on msm8916
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>
This commit is contained in:
parent
51f493ae71
commit
42e193cdcb
|
@ -712,6 +712,8 @@ static int pm8916_wcd_analog_probe(struct snd_soc_codec *codec)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snd_soc_codec_init_regmap(codec,
|
||||||
|
dev_get_regmap(codec->dev->parent, NULL));
|
||||||
snd_soc_codec_set_drvdata(codec, priv);
|
snd_soc_codec_set_drvdata(codec, priv);
|
||||||
priv->pmic_rev = snd_soc_read(codec, CDC_D_REVISION1);
|
priv->pmic_rev = snd_soc_read(codec, CDC_D_REVISION1);
|
||||||
priv->codec_version = snd_soc_read(codec, CDC_D_PERPH_SUBTYPE);
|
priv->codec_version = snd_soc_read(codec, CDC_D_PERPH_SUBTYPE);
|
||||||
|
@ -943,11 +945,6 @@ static int pm8916_wcd_analog_set_jack(struct snd_soc_codec *codec,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct regmap *pm8916_get_regmap(struct device *dev)
|
|
||||||
{
|
|
||||||
return dev_get_regmap(dev->parent, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg)
|
static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg)
|
||||||
{
|
{
|
||||||
struct pm8916_wcd_analog_priv *priv = arg;
|
struct pm8916_wcd_analog_priv *priv = arg;
|
||||||
|
@ -1082,7 +1079,6 @@ static const struct snd_soc_codec_driver pm8916_wcd_analog = {
|
||||||
.probe = pm8916_wcd_analog_probe,
|
.probe = pm8916_wcd_analog_probe,
|
||||||
.remove = pm8916_wcd_analog_remove,
|
.remove = pm8916_wcd_analog_remove,
|
||||||
.set_jack = pm8916_wcd_analog_set_jack,
|
.set_jack = pm8916_wcd_analog_set_jack,
|
||||||
.get_regmap = pm8916_get_regmap,
|
|
||||||
.component_driver = {
|
.component_driver = {
|
||||||
.controls = pm8916_wcd_analog_snd_controls,
|
.controls = pm8916_wcd_analog_snd_controls,
|
||||||
.num_controls = ARRAY_SIZE(pm8916_wcd_analog_snd_controls),
|
.num_controls = ARRAY_SIZE(pm8916_wcd_analog_snd_controls),
|
||||||
|
|
Loading…
Reference in a new issue