Merge branch 'master' into for-next
[firefly-linux-kernel-4.4.55.git] / sound / soc / codecs / wm8900.c
index 33c3b57f3f664d472b72ba1f3acc60c0822870b0..b4f11724a63ffc771c1a1d83909e31ae5cccaab7 100644 (file)
 
 struct wm8900_priv {
        enum snd_soc_control_type control_type;
-       void *control_data;
        u16 reg_cache[WM8900_MAXREG];
 
        u32 fll_in; /* FLL input frequency */
@@ -1189,7 +1188,6 @@ static int wm8900_probe(struct snd_soc_codec *codec)
        struct wm8900_priv *wm8900 = snd_soc_codec_get_drvdata(codec);
        int ret = 0, reg;
 
-       codec->control_data = wm8900->control_data;
        ret = snd_soc_codec_set_cache_io(codec, 8, 16, wm8900->control_type);
        if (ret != 0) {
                dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -1258,7 +1256,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8900 = {
        .resume =       wm8900_resume,
        .set_bias_level = wm8900_set_bias_level,
        .volatile_register = wm8900_volatile_register,
-       .reg_cache_size = sizeof(wm8900_reg_defaults),
+       .reg_cache_size = ARRAY_SIZE(wm8900_reg_defaults),
        .reg_word_size = sizeof(u16),
        .reg_cache_default = wm8900_reg_defaults,
 };
@@ -1273,7 +1271,6 @@ static int __devinit wm8900_spi_probe(struct spi_device *spi)
        if (wm8900 == NULL)
                return -ENOMEM;
 
-       wm8900->control_data = spi;
        wm8900->control_type = SND_SOC_SPI;
        spi_set_drvdata(spi, wm8900);
 
@@ -1294,7 +1291,6 @@ static int __devexit wm8900_spi_remove(struct spi_device *spi)
 static struct spi_driver wm8900_spi_driver = {
        .driver = {
                .name   = "wm8900-codec",
-               .bus    = &spi_bus_type,
                .owner  = THIS_MODULE,
        },
        .probe          = wm8900_spi_probe,
@@ -1314,7 +1310,6 @@ static __devinit int wm8900_i2c_probe(struct i2c_client *i2c,
                return -ENOMEM;
 
        i2c_set_clientdata(i2c, wm8900);
-       wm8900->control_data = i2c;
        wm8900->control_type = SND_SOC_I2C;
 
        ret =  snd_soc_register_codec(&i2c->dev,