aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/mc13783.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/mc13783.c')
-rw-r--r--sound/soc/codecs/mc13783.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 2c59b1fb69dc..9029e20514e1 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -608,14 +608,6 @@ static struct snd_kcontrol_new mc13783_control_list[] = {
608static int mc13783_probe(struct snd_soc_codec *codec) 608static int mc13783_probe(struct snd_soc_codec *codec)
609{ 609{
610 struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec); 610 struct mc13783_priv *priv = snd_soc_codec_get_drvdata(codec);
611 int ret;
612
613 ret = snd_soc_codec_set_cache_io(codec,
614 dev_get_regmap(codec->dev->parent, NULL));
615 if (ret != 0) {
616 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
617 return ret;
618 }
619 611
620 /* these are the reset values */ 612 /* these are the reset values */
621 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX0, 0x25893); 613 mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX0, 0x25893);
@@ -735,9 +727,15 @@ static struct snd_soc_dai_driver mc13783_dai_sync[] = {
735 } 727 }
736}; 728};
737 729
730static struct regmap *mc13783_get_regmap(struct device *dev)
731{
732 return dev_get_regmap(dev->parent, NULL);
733}
734
738static struct snd_soc_codec_driver soc_codec_dev_mc13783 = { 735static struct snd_soc_codec_driver soc_codec_dev_mc13783 = {
739 .probe = mc13783_probe, 736 .probe = mc13783_probe,
740 .remove = mc13783_remove, 737 .remove = mc13783_remove,
738 .get_regmap = mc13783_get_regmap,
741 .controls = mc13783_control_list, 739 .controls = mc13783_control_list,
742 .num_controls = ARRAY_SIZE(mc13783_control_list), 740 .num_controls = ARRAY_SIZE(mc13783_control_list),
743 .dapm_widgets = mc13783_dapm_widgets, 741 .dapm_widgets = mc13783_dapm_widgets,