ASoC: Add I/O control bus information to factored out cache setup
[deliverable/linux.git] / sound / soc / codecs / wm8960.c
index c529ffcfe5d886d40f45b7a201f13c9282522bb5..f59703be61c84b6213600edab224c0f71ab63bf6 100644 (file)
@@ -747,7 +747,8 @@ struct snd_soc_codec_device soc_codec_dev_wm8960 = {
 };
 EXPORT_SYMBOL_GPL(soc_codec_dev_wm8960);
 
-static int wm8960_register(struct wm8960_priv *wm8960)
+static int wm8960_register(struct wm8960_priv *wm8960,
+                          enum snd_soc_control_type control)
 {
        struct wm8960_data *pdata = wm8960->codec.dev->platform_data;
        struct snd_soc_codec *codec = &wm8960->codec;
@@ -785,7 +786,7 @@ static int wm8960_register(struct wm8960_priv *wm8960)
 
        memcpy(codec->reg_cache, wm8960_reg, sizeof(wm8960_reg));
 
-       ret = snd_soc_codec_set_cache_io(codec, 7, 9);
+       ret = snd_soc_codec_set_cache_io(codec, 7, 9, control);
        if (ret < 0) {
                dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
                goto err;
@@ -866,14 +867,13 @@ static __devinit int wm8960_i2c_probe(struct i2c_client *i2c,
                return -ENOMEM;
 
        codec = &wm8960->codec;
-       codec->hw_write = (hw_write_t)i2c_master_send;
 
        i2c_set_clientdata(i2c, wm8960);
        codec->control_data = i2c;
 
        codec->dev = &i2c->dev;
 
-       return wm8960_register(wm8960);
+       return wm8960_register(wm8960, SND_SOC_I2C);
 }
 
 static __devexit int wm8960_i2c_remove(struct i2c_client *client)
This page took 0.027597 seconds and 5 git commands to generate.