ASoC: Add I/O control bus information to factored out cache setup
[deliverable/linux.git] / sound / soc / codecs / wm8750.c
index ed09043181e1e76078780b38dc3f64baa5f16a67..e6422b161678552aff5a4b62930e3d51997edd13 100644 (file)
@@ -711,7 +711,8 @@ static int wm8750_resume(struct platform_device *pdev)
  * initialise the WM8750 driver
  * register the mixer and dsp interfaces with the kernel
  */
-static int wm8750_init(struct snd_soc_device *socdev)
+static int wm8750_init(struct snd_soc_device *socdev,
+                      enum snd_soc_control_type control)
 {
        struct snd_soc_codec *codec = socdev->card->codec;
        int reg, ret = 0;
@@ -726,7 +727,7 @@ static int wm8750_init(struct snd_soc_device *socdev)
        if (codec->reg_cache == NULL)
                return -ENOMEM;
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9);
+       ret = snd_soc_codec_set_cache_io(codec, 7, 9, control);
        if (ret < 0) {
                printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret);
                goto err;
@@ -809,7 +810,7 @@ static int wm8750_i2c_probe(struct i2c_client *i2c,
        i2c_set_clientdata(i2c, codec);
        codec->control_data = i2c;
 
-       ret = wm8750_init(socdev);
+       ret = wm8750_init(socdev, SND_SOC_I2C);
        if (ret < 0)
                pr_err("failed to initialise WM8750\n");
 
@@ -889,7 +890,7 @@ static int __devinit wm8750_spi_probe(struct spi_device *spi)
 
        codec->control_data = spi;
 
-       ret = wm8750_init(socdev);
+       ret = wm8750_init(socdev, SND_SOC_SPI);
        if (ret < 0)
                dev_err(&spi->dev, "failed to initialise WM8750\n");
 
@@ -967,7 +968,6 @@ static int wm8750_probe(struct platform_device *pdev)
 
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
        if (setup->i2c_address) {
-               codec->hw_write = (hw_write_t)i2c_master_send;
                ret = wm8750_add_i2c_device(pdev, setup);
        }
 #endif
This page took 0.028147 seconds and 5 git commands to generate.