diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-03-26 13:40:24 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-14 17:22:19 +0100 |
commit | bbc0bd7fd3f671096625b5cbde97e12e3e2dba8f (patch) | |
tree | cb95833e6444bc84a20b5e601555c8469a4526d7 /sound | |
parent | a39f75f7907fa3a708751dc283e3ab3e7da526b8 (diff) | |
download | talos-op-linux-bbc0bd7fd3f671096625b5cbde97e12e3e2dba8f.tar.gz talos-op-linux-bbc0bd7fd3f671096625b5cbde97e12e3e2dba8f.zip |
ASoC: 88pm860x: Remove the set_cache_io() entirely from ASoC probe.
As we can set the CODEC I/O while snd_soc_register_codec(), so the
calling of set_cache_io() from CODEC ASoC probe could be removed
entirely.
And then we can set the CODEC I/O in the device probe instead of
CODEC ASoC probe as earily as possible.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/88pm860x-codec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index b07e17160f94..dc9e6b94e645 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c @@ -1327,10 +1327,6 @@ static int pm860x_probe(struct snd_soc_codec *codec) pm860x->codec = codec; - ret = snd_soc_codec_set_cache_io(codec, pm860x->regmap); - if (ret) - return ret; - for (i = 0; i < 4; i++) { ret = request_threaded_irq(pm860x->irq[i], NULL, pm860x_codec_handler, IRQF_ONESHOT, @@ -1362,10 +1358,18 @@ static int pm860x_remove(struct snd_soc_codec *codec) return 0; } +struct regmap *pm860x_get_regmap(struct device *dev) +{ + struct pm860x_priv *pm860x = dev_get_drvdata(dev); + + return pm860x->regmap; +} + static struct snd_soc_codec_driver soc_codec_dev_pm860x = { .probe = pm860x_probe, .remove = pm860x_remove, .set_bias_level = pm860x_set_bias_level, + .get_regmap = pm860x_get_regmap, .controls = pm860x_snd_controls, .num_controls = ARRAY_SIZE(pm860x_snd_controls), |