diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-01 20:05:47 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-02 11:43:45 +0100 |
commit | 98d3088e534a2a61f6690b5426909b0c3b57a785 (patch) | |
tree | 1ff1a2de36cd469d503550c117b4f3b5aa65d94b /sound | |
parent | 9d40e5582c9c4cfb6977ba2a0ca9c2ed82c56f21 (diff) |
ASoC: core: Fix check before defaulting to regmap
Check if the chip has provided a write operation (which is mandatory for
I/O) rather than looking for control data as some of the MFDs use a global
for this. Also skip the attempt if there's no regmap available by device
in case things get confused by the attempt to default.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f219b2f7ee6..f81c5976b96 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1096,7 +1096,7 @@ static int soc_probe_codec(struct snd_soc_card *card, } /* If the driver didn't set I/O up try regmap */ - if (!codec->control_data) + if (!codec->write && dev_get_regmap(codec->dev, NULL)) snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP); if (driver->controls) |