]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: codec: Simplify ASoC probe code.
authorXiubo Li <Li.Xiubo@freescale.com>
Tue, 11 Mar 2014 04:43:20 +0000 (12:43 +0800)
committerMark Brown <broonie@linaro.org>
Tue, 11 Mar 2014 09:59:05 +0000 (09:59 +0000)
For some CODEC drivers like who act as the MFDs children are ignored
by this patch.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
73 files changed:
sound/soc/codecs/ad193x.c
sound/soc/codecs/adau1373.c
sound/soc/codecs/adav80x.c
sound/soc/codecs/ak4535.c
sound/soc/codecs/ak4641.c
sound/soc/codecs/ak4642.c
sound/soc/codecs/ak4671.c
sound/soc/codecs/alc5623.c
sound/soc/codecs/alc5632.c
sound/soc/codecs/cs4270.c
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cs42l52.c
sound/soc/codecs/cs42l73.c
sound/soc/codecs/da7210.c
sound/soc/codecs/da7213.c
sound/soc/codecs/da732x.c
sound/soc/codecs/da9055.c
sound/soc/codecs/isabelle.c
sound/soc/codecs/lm49453.c
sound/soc/codecs/max9768.c
sound/soc/codecs/max98088.c
sound/soc/codecs/max98090.c
sound/soc/codecs/max98095.c
sound/soc/codecs/max9850.c
sound/soc/codecs/ml26124.c
sound/soc/codecs/rt5631.c
sound/soc/codecs/rt5640.c
sound/soc/codecs/sn95031.c
sound/soc/codecs/ssm2518.c
sound/soc/codecs/ssm2602.c
sound/soc/codecs/sta32x.c
sound/soc/codecs/sta529.c
sound/soc/codecs/tlv320aic23.c
sound/soc/codecs/tlv320aic26.c
sound/soc/codecs/tlv320aic32x4.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/wm2000.c
sound/soc/codecs/wm2200.c
sound/soc/codecs/wm5100.c
sound/soc/codecs/wm8510.c
sound/soc/codecs/wm8523.c
sound/soc/codecs/wm8580.c
sound/soc/codecs/wm8711.c
sound/soc/codecs/wm8728.c
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8737.c
sound/soc/codecs/wm8741.c
sound/soc/codecs/wm8750.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8770.c
sound/soc/codecs/wm8776.c
sound/soc/codecs/wm8804.c
sound/soc/codecs/wm8900.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8955.c
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8961.c
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8971.c
sound/soc/codecs/wm8974.c
sound/soc/codecs/wm8978.c
sound/soc/codecs/wm8983.c
sound/soc/codecs/wm8985.c
sound/soc/codecs/wm8988.c
sound/soc/codecs/wm8990.c
sound/soc/codecs/wm8991.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8995.c
sound/soc/codecs/wm8996.c
sound/soc/codecs/wm9081.c
sound/soc/codecs/wm9090.c

index 9381a767e75fac9963ecf58e7a55d58b5c011a61..6844d0b2af6889e65501a954eca9ac5061913fe7 100644 (file)
@@ -322,14 +322,6 @@ static struct snd_soc_dai_driver ad193x_dai = {
 static int ad193x_codec_probe(struct snd_soc_codec *codec)
 {
        struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec);
-       int ret;
-
-       codec->control_data = ad193x->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        /* default setting for ad193x */
 
@@ -347,7 +339,7 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec)
        regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */
        regmap_write(ad193x->regmap, AD193X_PLL_CLK_CTRL1, 0x04);
 
-       return ret;
+       return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
index eb836ed5271f448631ad1268ddd548b69db39c51..db5c303dcdbc7eedb2ba620881b37bde9f42490f 100644 (file)
@@ -1376,15 +1376,8 @@ static int adau1373_probe(struct snd_soc_codec *codec)
        struct adau1373_platform_data *pdata = codec->dev->platform_data;
        bool lineout_differential = false;
        unsigned int val;
-       int ret;
        int i;
 
-       ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-       if (ret) {
-               dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        if (pdata) {
                if (pdata->num_drc > ARRAY_SIZE(pdata->drc_setting))
                        return -EINVAL;
index f78b27a7c461d3e5580dad311fd583f30755a3b4..8d79c3fe02dc14431e9616ee56717b5784391afa 100644 (file)
@@ -798,15 +798,8 @@ static struct snd_soc_dai_driver adav80x_dais[] = {
 
 static int adav80x_probe(struct snd_soc_codec *codec)
 {
-       int ret;
        struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
 
-       ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-       if (ret) {
-               dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Force PLLs on for SYSCLK output */
        snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
        snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2");
index 684fe910669fd884f04e3900c03fc3631773e821..30e297890fec43eca2b01f344efc703aba14cacd 100644 (file)
@@ -388,15 +388,6 @@ static int ak4535_resume(struct snd_soc_codec *codec)
 
 static int ak4535_probe(struct snd_soc_codec *codec)
 {
-       struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec);
-       int ret;
-
-       codec->control_data = ak4535->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
        /* power on device */
        ak4535_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
index 94cbe508dd3748723197f7443f5a6ed8524b2b14..a7b7d9858f8a18030ee8cd6ff0022d77bc7c5dcc 100644 (file)
@@ -519,14 +519,6 @@ static int ak4641_resume(struct snd_soc_codec *codec)
 
 static int ak4641_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* power on device */
        ak4641_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
index 1f646c6e90c6b3ff688e0fd2582fcb1268679bb1..92655cc189ae0ad5791ab3483286de18dbd559b5 100644 (file)
@@ -465,14 +465,6 @@ static int ak4642_resume(struct snd_soc_codec *codec)
 
 static int ak4642_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ak4642_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        return 0;
index deb2b44669de4084bdf2b4386040580142a292a0..998fa0c5a0b93e2d351ec2a2936164748b8c1b91 100644 (file)
@@ -613,17 +613,7 @@ static struct snd_soc_dai_driver ak4671_dai = {
 
 static int ak4671_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
-       ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-
-       return ret;
+       return ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 }
 
 static int ak4671_remove(struct snd_soc_codec *codec)
index ed506253a9143351d14c4744fc1a1897dbe7663f..09f7e773bafb8721619843c187be4c24b06af73e 100644 (file)
@@ -904,13 +904,6 @@ static int alc5623_probe(struct snd_soc_codec *codec)
        struct snd_soc_dapm_context *dapm = &codec->dapm;
        int ret;
 
-       codec->control_data = alc5623->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        alc5623_reset(codec);
 
        /* power on device */
index d885056ad8f2a73d6ffe09d222db1e5ce33c9d72..ec071a6306ef567fb37b8c97981b64d1b3390f9e 100644 (file)
@@ -1063,14 +1063,6 @@ static int alc5632_probe(struct snd_soc_codec *codec)
        struct alc5632_priv *alc5632 = snd_soc_codec_get_drvdata(codec);
        int ret;
 
-       codec->control_data = alc5632->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* power on device  */
        alc5632_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
index 83c835d9fd884b18a87cdbb5420838b8fd9229f0..3920e626494885947853fd856f9d5ed37bc443ed 100644 (file)
@@ -506,15 +506,6 @@ static int cs4270_probe(struct snd_soc_codec *codec)
        struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
        int ret;
 
-       /* Tell ASoC what kind of I/O to use to read the registers.  ASoC will
-        * then do the I2C transactions itself.
-        */
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "failed to set cache I/O (ret=%i)\n", ret);
-               return ret;
-       }
-
        /* Disable auto-mute.  This feature appears to be buggy.  In some
         * situations, auto-mute will not deactivate when it should, so we want
         * this feature disabled by default.  An application (e.g. alsactl) can
index 3eab46020a30eebe71ff8c2322d57bafd473ccf7..a0c6060df4b4504c7757fa0b576e316b656999f5 100644 (file)
@@ -489,12 +489,6 @@ static int cs42l51_probe(struct snd_soc_codec *codec)
 {
        int ret, reg;
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /*
         * DAC configuration
         * - Use signal processor
index 0bac6d5a4ac8fac7c00e3a909f044a499f11761b..4bd59cea49221f7619c9f5f39cbd2f2c87654ea3 100644 (file)
@@ -1115,14 +1115,7 @@ static void cs42l52_free_beep(struct snd_soc_codec *codec)
 static int cs42l52_probe(struct snd_soc_codec *codec)
 {
        struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec);
-       int ret;
 
-       codec->control_data = cs42l52->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
        regcache_cache_only(cs42l52->regmap, true);
 
        cs42l52_add_mic_controls(codec);
@@ -1134,7 +1127,7 @@ static int cs42l52_probe(struct snd_soc_codec *codec)
        cs42l52->sysclk = CS42L52_DEFAULT_CLK;
        cs42l52->config.format = CS42L52_DEFAULT_FORMAT;
 
-       return ret;
+       return 0;
 }
 
 static int cs42l52_remove(struct snd_soc_codec *codec)
index 549d5d6a3fef47f0680934c68b36a2c6a48529d0..b9aa009b5b0140e76af6a9a905944ea4dde6ce33 100644 (file)
@@ -1348,17 +1348,8 @@ static int cs42l73_resume(struct snd_soc_codec *codec)
 
 static int cs42l73_probe(struct snd_soc_codec *codec)
 {
-       int ret;
        struct cs42l73_private *cs42l73 = snd_soc_codec_get_drvdata(codec);
 
-       codec->control_data = cs42l73->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        cs42l73_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        /* Set Charge Pump Frequency */
@@ -1371,7 +1362,7 @@ static int cs42l73_probe(struct snd_soc_codec *codec)
        cs42l73->mclksel = CS42L73_CLKID_MCLK1;
        cs42l73->mclk = 0;
 
-       return ret;
+       return 0;
 }
 
 static int cs42l73_remove(struct snd_soc_codec *codec)
index e62e294a8033a02ed4e7a90c6c9b41317df79d18..a5838ba69e4e42d192eb56a52d83d1587bcc1dde 100644 (file)
@@ -1071,17 +1071,9 @@ static struct snd_soc_dai_driver da7210_dai = {
 static int da7210_probe(struct snd_soc_codec *codec)
 {
        struct da7210_priv *da7210 = snd_soc_codec_get_drvdata(codec);
-       int ret;
 
        dev_info(codec->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION);
 
-       codec->control_data = da7210->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        da7210->mclk_rate       = 0;    /* This will be set from set_sysclk() */
        da7210->master          = 0;    /* This will be set from set_fmt() */
 
index 0c77e7ad7423fcf9f7929bfe03d19e4d4427cff1..110f4dd1a89eb206263caba1cee8a046f463dd14 100644 (file)
@@ -1384,17 +1384,9 @@ static int da7213_set_bias_level(struct snd_soc_codec *codec,
 
 static int da7213_probe(struct snd_soc_codec *codec)
 {
-       int ret;
        struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec);
        struct da7213_platform_data *pdata = da7213->pdata;
 
-       codec->control_data = da7213->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Default to using ALC auto offset calibration mode. */
        snd_soc_update_bits(codec, DA7213_ALC_CTRL1,
                            DA7213_ALC_CALIB_MODE_MAN, 0);
index 8053e0e7f4a72e8edd8d1d4659d39fc408bf2fb8..fdefc4bb8bc46333d622cc5e4f0ae205b4e9d782 100644 (file)
@@ -1516,23 +1516,14 @@ static int da732x_probe(struct snd_soc_codec *codec)
 {
        struct da732x_priv *da732x = snd_soc_codec_get_drvdata(codec);
        struct snd_soc_dapm_context *dapm = &codec->dapm;
-       int ret = 0;
 
        da732x->codec = codec;
 
        dapm->idle_bias_off = false;
 
-       codec->control_data = da732x->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to register codec.\n");
-               goto err;
-       }
-
        da732x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-err:
-       return ret;
+
+       return 0;
 }
 
 static int da732x_remove(struct snd_soc_codec *codec)
index 52b79a487ac7db318dd252fe30befd6a3c56b2ec..f0a371dbaee3b028fca0c0d25f843b3a91d08d55 100644 (file)
@@ -1381,16 +1381,8 @@ static int da9055_set_bias_level(struct snd_soc_codec *codec,
 
 static int da9055_probe(struct snd_soc_codec *codec)
 {
-       int ret;
        struct da9055_priv *da9055 = snd_soc_codec_get_drvdata(codec);
 
-       codec->control_data = da9055->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Enable all Gain Ramps */
        snd_soc_update_bits(codec, DA9055_AUX_L_CTRL,
                            DA9055_GAIN_RAMPING_EN, DA9055_GAIN_RAMPING_EN);
index 5839048ec4674e5d20cc5f06e206c2210977999e..087b3cb2dcdfe07b2244953606209fe125413788 100644 (file)
@@ -1082,23 +1082,7 @@ static struct snd_soc_dai_driver isabelle_dai[] = {
        },
 };
 
-static int isabelle_probe(struct snd_soc_codec *codec)
-{
-       int ret = 0;
-
-       codec->control_data = dev_get_regmap(codec->dev, NULL);
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
-       return 0;
-}
-
 static struct snd_soc_codec_driver soc_codec_dev_isabelle = {
-       .probe = isabelle_probe,
        .set_bias_level = isabelle_set_bias_level,
        .controls = isabelle_snd_controls,
        .num_controls = ARRAY_SIZE(isabelle_snd_controls),
index e19490cfb3a8bde2036e61d877b3a8c407cc510c..069cb03599326cd1ab82f5a8c4263cc628231cd4 100644 (file)
@@ -1409,22 +1409,6 @@ static int lm49453_resume(struct snd_soc_codec *codec)
        return 0;
 }
 
-static int lm49453_probe(struct snd_soc_codec *codec)
-{
-       struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec);
-       int ret = 0;
-
-       codec->control_data = lm49453->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
-       return 0;
-}
-
 /* power down chip */
 static int lm49453_remove(struct snd_soc_codec *codec)
 {
@@ -1433,7 +1417,6 @@ static int lm49453_remove(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_lm49453 = {
-       .probe = lm49453_probe,
        .remove = lm49453_remove,
        .suspend = lm49453_suspend,
        .resume = lm49453_resume,
index 31f91560e9f6df0fb115ea862b712e9863cad9dd..ec481fc428c7c9fcb7a963fbabd1e9f34c1ace7b 100644 (file)
@@ -135,11 +135,6 @@ static int max9768_probe(struct snd_soc_codec *codec)
        struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec);
        int ret;
 
-       codec->control_data = max9768->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 2, 6, SND_SOC_REGMAP);
-       if (ret)
-               return ret;
-
        if (max9768->flags & MAX9768_FLAG_CLASSIC_PWM) {
                ret = snd_soc_write(codec, MAX9768_CTRL, MAX9768_CTRL_PWM);
                if (ret)
index ee660e2d3df3ba0ced0587ee13bab59fc86de6f9..64965005a41e76dcd6d417949b41a407d647bd98 100644 (file)
@@ -1915,12 +1915,6 @@ static int max98088_probe(struct snd_soc_codec *codec)
 
        regcache_mark_dirty(max98088->regmap);
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* initialize private data */
 
        max98088->sysclk = (unsigned)-1;
index 51f9b3d16b41dbf4cc80dddc6d0a081ccb83fe90..4ac3b67b2006e4acfeb94abd3bcd958adcfc7a26 100644 (file)
@@ -2195,14 +2195,6 @@ static int max98090_probe(struct snd_soc_codec *codec)
 
        max98090->codec = codec;
 
-       codec->control_data = max98090->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Reset the codec, the DSP core, and disable all interrupts */
        max98090_reset(max98090);
 
index 3ba1170ebb53dcdb05d56e043121d83f3a20cbfe..2a9bfefb7d26d3686fbea3b2fcabf0aafc1e1d43 100644 (file)
@@ -2234,12 +2234,6 @@ static int max98095_probe(struct snd_soc_codec *codec)
        struct i2c_client *client;
        int ret = 0;
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* reset the codec, the DSP core, and disable all interrupts */
        max98095_reset(codec);
 
index 82757ebf0301df25ab7d2a15da0d6af5cc5623ce..4fdf5aaa236f65cbb643cd837bd792da0619970d 100644 (file)
@@ -312,14 +312,6 @@ static int max9850_resume(struct snd_soc_codec *codec)
 
 static int max9850_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* enable zero-detect */
        snd_soc_update_bits(codec, MAX9850_GENERAL_PURPOSE, 1, 1);
        /* enable slew-rate control */
index 185fa3bc3052c826dd71f74cf0e52b6945aaae2c..b9f21fe5a7dca30380bd2c6c834636e5c9182b71 100644 (file)
@@ -586,16 +586,6 @@ static int ml26124_resume(struct snd_soc_codec *codec)
 
 static int ml26124_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-       struct ml26124_priv *priv = snd_soc_codec_get_drvdata(codec);
-       codec->control_data = priv->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Software Reset */
        snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 1);
        snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 0);
index 912c9cbc27242eb48229506e86b3295a81967185..73fcd3cff3271d9cb16b3600294db406cae43e06 100644 (file)
@@ -1585,15 +1585,6 @@ static int rt5631_probe(struct snd_soc_codec *codec)
 {
        struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec);
        unsigned int val;
-       int ret;
-
-       codec->control_data = rt5631->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        val = rt5631_read_index(codec, RT5631_ADDA_MIXER_INTL_REG3);
        if (val & 0x0002)
index a3fb411796364a683d554b6278ba9bda6b942326..074cff100f54e2111f902f6378873234808dd003 100644 (file)
@@ -1943,16 +1943,8 @@ static int rt5640_set_bias_level(struct snd_soc_codec *codec,
 static int rt5640_probe(struct snd_soc_codec *codec)
 {
        struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
-       int ret;
 
        rt5640->codec = codec;
-       codec->control_data = rt5640->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        codec->dapm.idle_bias_off = 1;
        rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF);
index 13045f2af4d32a7725961feabc628ac6e088e80c..193760ec98ef9bb3da4af1dcdb1c2320716448b5 100644 (file)
@@ -825,8 +825,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
 {
        pr_debug("codec_probe called\n");
 
-       snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-
        /* PCM interface config
         * This sets the pcm rx slot conguration to max 6 slots
         * for max 4 dais (2 stereo and 2 mono)
index cc8debce752f73055a3253f5ac0928803fbc1091..cf4a6572f35b1f20cc2f71169f0365efc2ccf70e 100644 (file)
@@ -648,16 +648,6 @@ static struct snd_soc_dai_driver ssm2518_dai = {
 
 static int ssm2518_probe(struct snd_soc_codec *codec)
 {
-       struct ssm2518 *ssm2518 = snd_soc_codec_get_drvdata(codec);
-       int ret;
-
-       codec->control_data = ssm2518->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        return ssm2518_set_bias_level(codec, SND_SOC_BIAS_OFF);
 }
 
index af76bbd1b24fbde13e686618c9ab2409a8e18624..9fe4d485e69998d2f7a289ced6e4747e3f04b3d2 100644 (file)
@@ -573,13 +573,6 @@ static int ssm260x_probe(struct snd_soc_codec *codec)
        struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
        int ret;
 
-       codec->control_data = ssm2602->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
index 06edb396e733f1ad2ef26698a41b4eb1fdc18ea6..1cab6f62be7c454887df4a44f95f5716b101b85d 100644 (file)
@@ -872,16 +872,6 @@ static int sta32x_probe(struct snd_soc_codec *codec)
                return ret;
        }
 
-       /* Tell ASoC what kind of I/O to use to read the registers.  ASoC will
-        * then do the I2C transactions itself.
-        */
-       codec->control_data = sta32x->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "failed to set cache I/O (ret=%i)\n", ret);
-               goto err;
-       }
-
        /* Chip documentation explicitly requires that the reset values
         * of reserved register bits are left untouched.
         * Write the register default value to cache for reserved registers,
@@ -946,10 +936,6 @@ static int sta32x_probe(struct snd_soc_codec *codec)
        regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
 
        return 0;
-
-err:
-       regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
-       return ret;
 }
 
 static int sta32x_remove(struct snd_soc_codec *codec)
index 40c07be9b5814f170f73fa1b3670d3813101bb67..30aae61bfdb32894e1abdac6ee0ae25dd256af33 100644 (file)
@@ -322,16 +322,6 @@ static struct snd_soc_dai_driver sta529_dai = {
 
 static int sta529_probe(struct snd_soc_codec *codec)
 {
-       struct sta529 *sta529 = snd_soc_codec_get_drvdata(codec);
-       int ret;
-
-       codec->control_data = sta529->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
        sta529_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        return 0;
index 7b4cfef232ea71b6551332b8ff4af1a8f9e48dea..46b8a5073857b44a1fc87cf967681f52224e980f 100644 (file)
@@ -559,14 +559,6 @@ static int tlv320aic23_resume(struct snd_soc_codec *codec)
 
 static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Reset codec */
        snd_soc_write(codec, TLV320AIC23_RESET, 0);
 
index 94a658fa6d97408e84682cea3e3ecc4c9a01cc1d..8037beabd0301118ab52179ee15fcb1d82120d20 100644 (file)
@@ -295,8 +295,6 @@ static int aic26_probe(struct snd_soc_codec *codec)
        struct aic26 *aic26 = dev_get_drvdata(codec->dev);
        int ret, reg;
 
-       snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
-
        aic26->codec = codec;
 
        /* Reset the codec to power on defaults */
index c6bd7e75352d2c5298e28df490f1444dc027bc10..1d9b117345a3ae6fc8182f73733603a34f6a20d7 100644 (file)
@@ -614,8 +614,6 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
        struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec);
        u32 tmp_reg;
 
-       snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-
        if (gpio_is_valid(aic32x4->rstn_gpio)) {
                ndelay(10);
                gpio_set_value(aic32x4->rstn_gpio, 1);
index 470fbfb4b3861314b6ecc74dfd95d5c2cd8b0d89..b1835103e9b4002ab44429d40bb16da8372f65aa 100644 (file)
@@ -1344,12 +1344,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
        INIT_LIST_HEAD(&aic3x->list);
        aic3x->codec = codec;
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++) {
                aic3x->disable_nb[i].nb.notifier_call = aic3x_regulator_event;
                aic3x->disable_nb[i].aic3x = aic3x;
index 8ae50274ea8f12f275938e2cdab2c836db1f687e..83a2c872925c4bbd9a844ea36f8b5127fd72fd41 100644 (file)
@@ -786,8 +786,6 @@ static int wm2000_probe(struct snd_soc_codec *codec)
 {
        struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
 
-       snd_soc_codec_set_cache_io(codec, 16, 8, SND_SOC_REGMAP);
-
        /* This will trigger a transition to standby mode by default */
        wm2000_anc_set_mode(wm2000);
 
index 57ba315d0c84d41c4c5f8b390014cde50f84f85f..5129d91a6da477e31ce8c39f84e252d1fdde7aa3 100644 (file)
@@ -1556,15 +1556,8 @@ static int wm2200_probe(struct snd_soc_codec *codec)
        int ret;
 
        wm2200->codec = codec;
-       codec->control_data = wm2200->regmap;
        codec->dapm.bias_level = SND_SOC_BIAS_OFF;
 
-       ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = snd_soc_add_codec_controls(codec, wm_adsp1_fw_controls, 2);
        if (ret != 0)
                return ret;
index 4e3e31aaf5098e473391f578df6fe0c3c6042a95..bac848f009e757edbd59701a98f97e395b3581e4 100644 (file)
@@ -2337,13 +2337,6 @@ static int wm5100_probe(struct snd_soc_codec *codec)
        int ret, i;
 
        wm5100->codec = codec;
-       codec->control_data = wm5100->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        for (i = 0; i < ARRAY_SIZE(wm5100_dig_vu); i++)
                snd_soc_update_bits(codec, wm5100_dig_vu[i], WM5100_OUT_VU,
index 7df7d45727559e98501eef2500b3cc610ee8a4b0..1c1e328feeb862f84efbfca08b924c1313c69d4f 100644 (file)
@@ -589,20 +589,12 @@ static int wm8510_resume(struct snd_soc_codec *codec)
 
 static int wm8510_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        wm8510_reset(codec);
 
        /* power on device */
        wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
-       return ret;
+       return 0;
 }
 
 /* power down chip */
index 74d106dc76676d5481ae367ad2c5115e8d7df32a..e6116aff09436484d49a157cb3a9fe0fe6c7dbc8 100644 (file)
@@ -392,18 +392,11 @@ static int wm8523_resume(struct snd_soc_codec *codec)
 static int wm8523_probe(struct snd_soc_codec *codec)
 {
        struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
-       int ret;
 
        wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0];
        wm8523->rate_constraint.count =
                ARRAY_SIZE(wm8523->rate_constraint_list);
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Change some default settings - latch VU and enable ZC */
        snd_soc_update_bits(codec, WM8523_DAC_GAINR,
                            WM8523_DACR_VU, WM8523_DACR_VU);
index 318989acbbe5fbb97878856ccab46330422f6bdf..7558c838193d7db2bedc46b12c8a1c4c29d2e655 100644 (file)
@@ -869,12 +869,6 @@ static int wm8580_probe(struct snd_soc_codec *codec)
        struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
        int ret = 0;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = regulator_bulk_enable(ARRAY_SIZE(wm8580->supplies),
                                    wm8580->supplies);
        if (ret != 0) {
index d99f948c513cd80bf56f96f6657ce20224f2fb0d..ef6cbc7ba489ad3d9114a1ceae451252cad8fd87 100644 (file)
@@ -367,12 +367,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)
 {
        int ret;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8711_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset\n");
index cd89033e84c08a1d290cb012cee545273b35badd..bac7fc28fe71b34c0afc27f553cc01efebd6cf8d 100644 (file)
@@ -228,19 +228,10 @@ static int wm8728_resume(struct snd_soc_codec *codec)
 
 static int wm8728_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n",
-                      ret);
-               return ret;
-       }
-
        /* power on device */
        wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
-       return ret;
+       return 0;
 }
 
 static int wm8728_remove(struct snd_soc_codec *codec)
index 029720366ff8f65f7d6b208216f7cba64b6523af..2c95b633e7dffcc4ddd84ef09ffdbb6839488480 100644 (file)
@@ -583,13 +583,6 @@ static int wm8731_probe(struct snd_soc_codec *codec)
        struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
        int ret = 0, i;
 
-       codec->control_data = wm8731->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        for (i = 0; i < ARRAY_SIZE(wm8731->supplies); i++)
                wm8731->supplies[i].supply = wm8731_supply_names[i];
 
index 2f167a8ca01b507cb3b61521de5db174b186b073..3693479b43d54c02e1f445ed833ea2184c2ae5e4 100644 (file)
@@ -570,12 +570,6 @@ static int wm8737_probe(struct snd_soc_codec *codec)
        struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec);
        int ret;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = regulator_bulk_enable(ARRAY_SIZE(wm8737->supplies),
                                    wm8737->supplies);
        if (ret != 0) {
index 2895c8d3b5e4cce600114dcab949f28b82cf2c7e..ecf4fcfa99fdff5e951ce1596ec1415fb909b792 100644 (file)
@@ -429,12 +429,6 @@ static int wm8741_probe(struct snd_soc_codec *codec)
                goto err_get;
        }
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               goto err_enable;
-       }
-
        ret = wm8741_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset\n");
index 78616a638a55ad4a76f11559f08c6dc4bdb708f6..33990b63d21428a8f8281ff98b1c071f907b211e 100644 (file)
@@ -702,12 +702,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)
 {
        int ret;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8750_reset(codec);
        if (ret < 0) {
                printk(KERN_ERR "wm8750: failed to reset: %d\n", ret);
index be85da93a2682fb89c7c668042f772fc08ca7452..0d1670b7070243a22ff5952bb655c8efdf13907f 100644 (file)
@@ -1471,13 +1471,6 @@ static int wm8753_probe(struct snd_soc_codec *codec)
 
        INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8753_work);
 
-       codec->control_data = wm8753->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8753_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
index 89a18d82f303e168f874a418840a9d33a4923910..32e73632052639ea5d710a4c1b24e8d8780e1804 100644 (file)
@@ -580,12 +580,6 @@ static int wm8770_probe(struct snd_soc_codec *codec)
        wm8770 = snd_soc_codec_get_drvdata(codec);
        wm8770->codec = codec;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = regulator_bulk_enable(ARRAY_SIZE(wm8770->supplies),
                                    wm8770->supplies);
        if (ret) {
index ef824672523206a1a3f5d593647a20ae5487b941..70952ceb278b8699a11600c011bf8bcf35e99699 100644 (file)
@@ -430,12 +430,6 @@ static int wm8776_probe(struct snd_soc_codec *codec)
 {
        int ret = 0;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8776_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
index 9bc8206a68071267cbb18856dc5c9722930af147..448a943e5a1b4be34cfeab73b3410983b5c8488c 100644 (file)
@@ -546,14 +546,6 @@ static int wm8804_probe(struct snd_soc_codec *codec)
 
        wm8804 = snd_soc_codec_get_drvdata(codec);
 
-       codec->control_data = wm8804->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
-               return ret;
-       }
-
        for (i = 0; i < ARRAY_SIZE(wm8804->supplies); i++)
                wm8804->supplies[i].supply = wm8804_supply_names[i];
 
index e98bc7038a086b39231ecbb5196fb7a40fc92d1e..637be63cd474c1b4fa8b56805d3b0aee9993bd0a 100644 (file)
@@ -1178,13 +1178,7 @@ static int wm8900_resume(struct snd_soc_codec *codec)
 
 static int wm8900_probe(struct snd_soc_codec *codec)
 {
-       int ret = 0, reg;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
+       int reg;
 
        reg = snd_soc_read(codec, WM8900_REG_ID);
        if (reg != 0x8900) {
index eebcb1da3b7b10769f0e265f95c90a6638266f71..cf2f49fdb3bdc0cc0ee6a565f8867e03c8a0b5ac 100644 (file)
@@ -1897,21 +1897,13 @@ static void wm8903_free_gpio(struct wm8903_priv *wm8903)
 static int wm8903_probe(struct snd_soc_codec *codec)
 {
        struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
-       int ret;
 
        wm8903->codec = codec;
-       codec->control_data = wm8903->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        /* power on device */
        wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
-       return ret;
+       return 0;
 }
 
 /* power down chip */
index 53bbfac6a83ad14ed43d2aafca2514ea3a319468..817dddc7f8a11f7115b2e773f2b8142db118c7b8 100644 (file)
@@ -2047,9 +2047,6 @@ static void wm8904_handle_pdata(struct snd_soc_codec *codec)
 static int wm8904_probe(struct snd_soc_codec *codec)
 {
        struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
-       int ret;
-
-       codec->control_data = wm8904->regmap;
 
        switch (wm8904->devtype) {
        case WM8904:
@@ -2063,12 +2060,6 @@ static int wm8904_probe(struct snd_soc_codec *codec)
                return -EINVAL;
        }
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        wm8904_handle_pdata(codec);
 
        wm8904_add_widgets(codec);
index b404c26c1753407c849c61fdc5ac2db5254deaf0..1cdabaf076394012384588317d76e1db02c0a53a 100644 (file)
@@ -712,12 +712,6 @@ static int wm8940_probe(struct snd_soc_codec *codec)
        int ret;
        u16 reg;
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8940_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset\n");
index 82c8ba9757202402cfe53e44b0a7dd587df502b5..a94d1858930a796f1cb35f6eed5bad6452b4ddd3 100644 (file)
@@ -896,14 +896,6 @@ static int wm8955_probe(struct snd_soc_codec *codec)
        struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
        int ret, i;
 
-       codec->control_data = wm8955->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        for (i = 0; i < ARRAY_SIZE(wm8955->supplies); i++)
                wm8955->supplies[i].supply = wm8955_supply_names[i];
 
index f156010e52bc1ae5f206e1ddcf1b3a62aa1c1f2d..d04e9cad445c391046f0d586005668e62d1e997b 100644 (file)
@@ -976,12 +976,6 @@ static int wm8960_probe(struct snd_soc_codec *codec)
                        wm8960->set_bias_level = wm8960_set_bias_level_capless;
        }
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8960_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset\n");
index 900328e28a1596cc1cd189185f18460113de440c..db84507c1ec5f3cfc11a3cf8131c5bd47c253542 100644 (file)
@@ -836,15 +836,8 @@ static struct snd_soc_dai_driver wm8961_dai = {
 static int wm8961_probe(struct snd_soc_codec *codec)
 {
        struct snd_soc_dapm_context *dapm = &codec->dapm;
-       int ret = 0;
        u16 reg;
 
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Enable class W */
        reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_B);
        reg |= WM8961_CP_DYN_PWR_MASK;
index 97db3b45b4113ad5fe7f7d42dd0e4e018b8c8c51..1d556c945bb25abdad708f1d8b7c030b61fb765d 100644 (file)
@@ -3400,13 +3400,6 @@ static int wm8962_probe(struct snd_soc_codec *codec)
        bool dmicclk, dmicdat;
 
        wm8962->codec = codec;
-       codec->control_data = wm8962->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        wm8962->disable_nb[0].notifier_call = wm8962_regulator_event_0;
        wm8962->disable_nb[1].notifier_call = wm8962_regulator_event_1;
index 67aba78a7ca5d8de561d2a3c70a0f5a6e4307f7d..09b7b42002210b717e9ded871d4932fc1003a744 100644 (file)
@@ -648,12 +648,6 @@ static int wm8971_probe(struct snd_soc_codec *codec)
        int ret = 0;
        u16 reg;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        INIT_DELAYED_WORK(&codec->dapm.delayed_work, wm8971_work);
        wm8971_workq = create_workqueue("wm8971");
        if (wm8971_workq == NULL)
index 15f45c7bd8334971bb63235ade92a26cb82c2f57..ea0de269a47219256cea7371aeb3e02e47236a5a 100644 (file)
@@ -593,12 +593,6 @@ static int wm8974_probe(struct snd_soc_codec *codec)
 {
        int ret = 0;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8974_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset\n");
index d8fc531c0e59f0604ae72a4a0a1af68d010317c3..13de3688e86fa747d6a4a7de09a4b0d3b19a98bd 100644 (file)
@@ -975,19 +975,13 @@ static const int update_reg[] = {
 static int wm8978_probe(struct snd_soc_codec *codec)
 {
        struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
-       int ret = 0, i;
+       int i;
 
        /*
         * Set default system clock to PLL, it is more precise, this is also the
         * default hardware setting
         */
        wm8978->sysclk = WM8978_PLL;
-       codec->control_data = wm8978->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        /*
         * Set the update bit in all registers, that have one. This way all
index aa41ba0dfff4d288c5078da552acb4484df1f32e..84aa09319ba17b563b1163ffed72302316bc3bf4 100644 (file)
@@ -1000,12 +1000,6 @@ static int wm8983_probe(struct snd_soc_codec *codec)
        int ret;
        int i;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
-               return ret;
-       }
-
        ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
index 271b517911a4bc0d4d6003356afcf7a1cc317bed..64e211cb4bcfa70c0706c7b559b26243c14610f8 100644 (file)
@@ -1000,13 +1000,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)
        int ret;
 
        wm8985 = snd_soc_codec_get_drvdata(codec);
-       codec->control_data = wm8985->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
-               return ret;
-       }
 
        for (i = 0; i < ARRAY_SIZE(wm8985->supplies); i++)
                wm8985->supplies[i].supply = wm8985_supply_names[i];
index a55e1c2c382edde43985e2213f0502564bf8e17b..424bbf752f3f09f036fc6be0d80f389b16a165ef 100644 (file)
@@ -810,16 +810,8 @@ static int wm8988_resume(struct snd_soc_codec *codec)
 
 static int wm8988_probe(struct snd_soc_codec *codec)
 {
-       struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec);
        int ret = 0;
 
-       codec->control_data = wm8988->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        ret = wm8988_reset(codec);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to issue reset\n");
index 0ccd4d8d043bbcf0d0f689bc947c93545d88b16b..1487625551e7eefd4da803c08e84c868e1fb4402 100644 (file)
@@ -1292,14 +1292,6 @@ static int wm8990_resume(struct snd_soc_codec *codec)
  */
 static int wm8990_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        wm8990_reset(codec);
 
        /* charge output caps */
index 32d219570ccaeb57302d8fb4d63d26ec8a1b871f..844cc4a60d667ef8f67dd7b35f29b3834c07b938 100644 (file)
@@ -1248,14 +1248,6 @@ static int wm8991_remove(struct snd_soc_codec *codec)
 
 static int wm8991_probe(struct snd_soc_codec *codec)
 {
-       int ret;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
-               return ret;
-       }
-
        wm8991_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
 
        return 0;
index 433d59a0f3efa025598cf5c63f42640120893f90..1674a1f33ba0d5243a5edf31262d5dbfce5e6944 100644 (file)
@@ -1493,13 +1493,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
        wm8993->hubs_data.dcs_codes_r = -2;
        wm8993->hubs_data.series_startup = 1;
 
-       codec->control_data = wm8993->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Latch volume update bits and default ZC on */
        snd_soc_update_bits(codec, WM8993_RIGHT_DAC_DIGITAL_VOLUME,
                            WM8993_DAC_VU, WM8993_DAC_VU);
index 4300caff17838b59d195ba629b1e0c94b3eb3574..9fd76c9c4e36e3c60c2d7a88a4bf97879b87d8d8 100644 (file)
@@ -2047,13 +2047,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
        wm8995 = snd_soc_codec_get_drvdata(codec);
        wm8995->codec = codec;
 
-       codec->control_data = wm8995->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
-       if (ret < 0) {
-               dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
-               return ret;
-       }
-
        for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++)
                wm8995->supplies[i].supply = wm8995_supply_names[i];
 
index 1a7655b0aa2230890df4f5b82c34a609f7128f05..54066436d72c44c62fbdbaeac4c21d713e61dcb2 100644 (file)
@@ -2628,14 +2628,6 @@ static int wm8996_probe(struct snd_soc_codec *codec)
        init_completion(&wm8996->dcs_done);
        init_completion(&wm8996->fll_lock);
 
-       codec->control_data = wm8996->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               goto err;
-       }
-
        if (wm8996->pdata.num_retune_mobile_cfgs)
                wm8996_retune_mobile_pdata(codec);
        else
@@ -2674,13 +2666,11 @@ static int wm8996_probe(struct snd_soc_codec *codec)
                } else {
                        dev_err(codec->dev, "Failed to request IRQ: %d\n",
                                ret);
+                       return ret;
                }
        }
 
        return 0;
-
-err:
-       return ret;
 }
 
 static int wm8996_remove(struct snd_soc_codec *codec)
index 0982c1d38ec458205628b2fdd52ccc87a499db97..cda185d436f77a478d1f515c5674e4adcfa02fb2 100644 (file)
@@ -1265,15 +1265,6 @@ static struct snd_soc_dai_driver wm9081_dai = {
 static int wm9081_probe(struct snd_soc_codec *codec)
 {
        struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec);
-       int ret;
-
-       codec->control_data = wm9081->regmap;
-
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
 
        /* Enable zero cross by default */
        snd_soc_update_bits(codec, WM9081_ANALOGUE_LINEOUT,
@@ -1288,7 +1279,7 @@ static int wm9081_probe(struct snd_soc_codec *codec)
                                     ARRAY_SIZE(wm9081_eq_controls));
        }
 
-       return ret;
+       return 0;
 }
 
 static int wm9081_remove(struct snd_soc_codec *codec)
index a07fe1618eec439d3ba001573331f4046b4e2095..87934171f0637da2c2a307893a641a43b0193e0b 100644 (file)
@@ -522,16 +522,6 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,
 
 static int wm9090_probe(struct snd_soc_codec *codec)
 {
-       struct wm9090_priv *wm9090 = dev_get_drvdata(codec->dev);
-       int ret;
-
-       codec->control_data = wm9090->regmap;
-       ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
-       if (ret != 0) {
-               dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
-               return ret;
-       }
-
        /* Configure some defaults; they will be written out when we
         * bring the bias up.
         */