Date:2012-08-01 21:05:47 (11 years 7 months ago)
Author:Mark Brown
Commit:82a40fee5d73a5e34f38b64b726fc6586a2c72fd
Message: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>
Files: sound/soc/soc-core.c (1 diff)

Change Details

sound/soc/soc-core.c
10551055    }
10561056
10571057    /* If the driver didn't set I/O up try regmap */
1058    if (!codec->control_data)
1058    if (!codec->write && dev_get_regmap(codec->dev, NULL))
10591059        snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
10601060
10611061    if (driver->controls)

Archive Download the corresponding diff file



interactive