ASoC: don't use snd_soc_write/read on twl6040
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 14 Nov 2017 01:04:58 +0000 (01:04 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2017 18:50:01 +0000 (18:50 +0000)
twl6040 doesn't use regmap nor reg_cache. Its write/read are done
through twl6040_reg_write/read. This driver directly calling these
functions, but sometimes using snd_soc_write/read.
As part of cleanup, snd_soc_codec_driver::write, read will be
removed soon. Then, write/read access through snd_soc_write/read
will doesn't work on this driver, since it doesn't use regmap nor
reg_cache.
This patch replace snd_soc_write/read to twl6040_write/read.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/twl6040.c

index a8e6941a18680c19a5fbb22080288a1e9b28ea90..3b895b4b451c1d319d61b6ca9b0d777ad6d2a49b 100644 (file)
@@ -543,7 +543,7 @@ int twl6040_get_dl1_gain(struct snd_soc_codec *codec)
        if (snd_soc_dapm_get_pin_status(dapm, "HSOR") ||
                snd_soc_dapm_get_pin_status(dapm, "HSOL")) {
 
-               u8 val = snd_soc_read(codec, TWL6040_REG_HSLCTL);
+               u8 val = twl6040_read(codec, TWL6040_REG_HSLCTL);
                if (val & TWL6040_HSDACMODE)
                        /* HSDACL in LP mode */
                        return -8; /* -8dB */
@@ -1158,8 +1158,6 @@ static int twl6040_remove(struct snd_soc_codec *codec)
 static const struct snd_soc_codec_driver soc_codec_dev_twl6040 = {
        .probe = twl6040_probe,
        .remove = twl6040_remove,
-       .read = twl6040_read,
-       .write = twl6040_write,
        .set_bias_level = twl6040_set_bias_level,
        .suspend_bias_off = true,
        .ignore_pmdown_time = true,