aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-08-12 06:04:14 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-08-12 09:00:19 -0400
commitaf3751a0bfe4d461e0567961dc06448f2128e26f (patch)
tree650de7f2083e20173483673a28d55e5f1e32cbe4 /sound/soc
parent26e277d7151abcef8efa1e6f1f0d1420d4ed17c6 (diff)
ASoC: Remove unneeded control_data management from Wolfson drivers
Now soc-cache.c can figure out the I2C and SPI control data from the device for the CODEC we don't need to manually assign it in drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8510.c4
-rw-r--r--sound/soc/codecs/wm8523.c3
-rw-r--r--sound/soc/codecs/wm8580.c3
-rw-r--r--sound/soc/codecs/wm8711.c4
-rw-r--r--sound/soc/codecs/wm8728.c4
-rw-r--r--sound/soc/codecs/wm8731.c4
-rw-r--r--sound/soc/codecs/wm8741.c3
-rw-r--r--sound/soc/codecs/wm8750.c4
-rw-r--r--sound/soc/codecs/wm8753.c6
-rw-r--r--sound/soc/codecs/wm8776.c4
-rw-r--r--sound/soc/codecs/wm8900.c4
-rw-r--r--sound/soc/codecs/wm8903.c3
-rw-r--r--sound/soc/codecs/wm8955.c3
-rw-r--r--sound/soc/codecs/wm8961.c3
-rw-r--r--sound/soc/codecs/wm8971.c3
-rw-r--r--sound/soc/codecs/wm8974.c3
-rw-r--r--sound/soc/codecs/wm8988.c4
-rw-r--r--sound/soc/codecs/wm8990.c4
-rw-r--r--sound/soc/codecs/wm8993.c3
19 files changed, 1 insertions, 68 deletions
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 1c623de4a4cd..d00da2001a12 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -60,7 +60,6 @@ static const u16 wm8510_reg[WM8510_CACHEREGNUM] = {
60/* codec private data */ 60/* codec private data */
61struct wm8510_priv { 61struct wm8510_priv {
62 enum snd_soc_control_type control_type; 62 enum snd_soc_control_type control_type;
63 void *control_data;
64}; 63};
65 64
66static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" }; 65static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" };
@@ -561,7 +560,6 @@ static int wm8510_probe(struct snd_soc_codec *codec)
561 struct wm8510_priv *wm8510 = snd_soc_codec_get_drvdata(codec); 560 struct wm8510_priv *wm8510 = snd_soc_codec_get_drvdata(codec);
562 int ret; 561 int ret;
563 562
564 codec->control_data = wm8510->control_data;
565 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8510->control_type); 563 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8510->control_type);
566 if (ret < 0) { 564 if (ret < 0) {
567 printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret); 565 printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", ret);
@@ -611,7 +609,6 @@ static int __devinit wm8510_spi_probe(struct spi_device *spi)
611 if (wm8510 == NULL) 609 if (wm8510 == NULL)
612 return -ENOMEM; 610 return -ENOMEM;
613 611
614 wm8510->control_data = spi;
615 wm8510->control_type = SND_SOC_SPI; 612 wm8510->control_type = SND_SOC_SPI;
616 spi_set_drvdata(spi, wm8510); 613 spi_set_drvdata(spi, wm8510);
617 614
@@ -651,7 +648,6 @@ static __devinit int wm8510_i2c_probe(struct i2c_client *i2c,
651 return -ENOMEM; 648 return -ENOMEM;
652 649
653 i2c_set_clientdata(i2c, wm8510); 650 i2c_set_clientdata(i2c, wm8510);
654 wm8510->control_data = i2c;
655 wm8510->control_type = SND_SOC_I2C; 651 wm8510->control_type = SND_SOC_I2C;
656 652
657 ret = snd_soc_register_codec(&i2c->dev, 653 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 58d411b6faaf..712ef7c76f90 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -41,7 +41,6 @@ static const char *wm8523_supply_names[WM8523_NUM_SUPPLIES] = {
41/* codec private data */ 41/* codec private data */
42struct wm8523_priv { 42struct wm8523_priv {
43 enum snd_soc_control_type control_type; 43 enum snd_soc_control_type control_type;
44 void *control_data;
45 u16 reg_cache[WM8523_REGISTER_COUNT]; 44 u16 reg_cache[WM8523_REGISTER_COUNT];
46 struct regulator_bulk_data supplies[WM8523_NUM_SUPPLIES]; 45 struct regulator_bulk_data supplies[WM8523_NUM_SUPPLIES];
47 unsigned int sysclk; 46 unsigned int sysclk;
@@ -419,7 +418,6 @@ static int wm8523_probe(struct snd_soc_codec *codec)
419 int ret, i; 418 int ret, i;
420 419
421 codec->hw_write = (hw_write_t)i2c_master_send; 420 codec->hw_write = (hw_write_t)i2c_master_send;
422 codec->control_data = wm8523->control_data;
423 wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0]; 421 wm8523->rate_constraint.list = &wm8523->rate_constraint_list[0];
424 wm8523->rate_constraint.count = 422 wm8523->rate_constraint.count =
425 ARRAY_SIZE(wm8523->rate_constraint_list); 423 ARRAY_SIZE(wm8523->rate_constraint_list);
@@ -528,7 +526,6 @@ static __devinit int wm8523_i2c_probe(struct i2c_client *i2c,
528 return -ENOMEM; 526 return -ENOMEM;
529 527
530 i2c_set_clientdata(i2c, wm8523); 528 i2c_set_clientdata(i2c, wm8523);
531 wm8523->control_data = i2c;
532 wm8523->control_type = SND_SOC_I2C; 529 wm8523->control_type = SND_SOC_I2C;
533 530
534 ret = snd_soc_register_codec(&i2c->dev, 531 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index cae58941a32f..39ad46c41e8a 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -200,7 +200,6 @@ static const char *wm8580_supply_names[WM8580_NUM_SUPPLIES] = {
200/* codec private data */ 200/* codec private data */
201struct wm8580_priv { 201struct wm8580_priv {
202 enum snd_soc_control_type control_type; 202 enum snd_soc_control_type control_type;
203 void *control_data;
204 struct regulator_bulk_data supplies[WM8580_NUM_SUPPLIES]; 203 struct regulator_bulk_data supplies[WM8580_NUM_SUPPLIES];
205 u16 reg_cache[WM8580_MAX_REGISTER + 1]; 204 u16 reg_cache[WM8580_MAX_REGISTER + 1];
206 struct pll_state a; 205 struct pll_state a;
@@ -778,7 +777,6 @@ static int wm8580_probe(struct snd_soc_codec *codec)
778 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); 777 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
779 int ret = 0,i; 778 int ret = 0,i;
780 779
781 codec->control_data = wm8580->control_data;
782 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8580->control_type); 780 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8580->control_type);
783 if (ret < 0) { 781 if (ret < 0) {
784 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 782 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -858,7 +856,6 @@ static int wm8580_i2c_probe(struct i2c_client *i2c,
858 return -ENOMEM; 856 return -ENOMEM;
859 857
860 i2c_set_clientdata(i2c, wm8580); 858 i2c_set_clientdata(i2c, wm8580);
861 wm8580->control_data = i2c;
862 wm8580->control_type = SND_SOC_I2C; 859 wm8580->control_type = SND_SOC_I2C;
863 860
864 ret = snd_soc_register_codec(&i2c->dev, 861 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 8d942b3b111f..f8d9c60e7fad 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -34,7 +34,6 @@
34/* codec private data */ 34/* codec private data */
35struct wm8711_priv { 35struct wm8711_priv {
36 enum snd_soc_control_type bus_type; 36 enum snd_soc_control_type bus_type;
37 void *control_data;
38 u16 reg_cache[WM8711_CACHEREGNUM]; 37 u16 reg_cache[WM8711_CACHEREGNUM];
39 unsigned int sysclk; 38 unsigned int sysclk;
40}; 39};
@@ -378,7 +377,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)
378 struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec); 377 struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec);
379 int ret, reg; 378 int ret, reg;
380 379
381 codec->control_data = wm8711->control_data;
382 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8711->bus_type); 380 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8711->bus_type);
383 if (ret < 0) { 381 if (ret < 0) {
384 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 382 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -436,7 +434,6 @@ static int __devinit wm8711_spi_probe(struct spi_device *spi)
436 return -ENOMEM; 434 return -ENOMEM;
437 435
438 spi_set_drvdata(spi, wm8711); 436 spi_set_drvdata(spi, wm8711);
439 wm8711->control_data = spi;
440 wm8711->bus_type = SND_SOC_SPI; 437 wm8711->bus_type = SND_SOC_SPI;
441 438
442 ret = snd_soc_register_codec(&spi->dev, 439 ret = snd_soc_register_codec(&spi->dev,
@@ -476,7 +473,6 @@ static __devinit int wm8711_i2c_probe(struct i2c_client *client,
476 return -ENOMEM; 473 return -ENOMEM;
477 474
478 i2c_set_clientdata(client, wm8711); 475 i2c_set_clientdata(client, wm8711);
479 wm8711->control_data = client;
480 wm8711->bus_type = SND_SOC_I2C; 476 wm8711->bus_type = SND_SOC_I2C;
481 477
482 ret = snd_soc_register_codec(&client->dev, 478 ret = snd_soc_register_codec(&client->dev,
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index ae2292444783..5e5a1625194c 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -45,7 +45,6 @@ static const u16 wm8728_reg_defaults[] = {
45/* codec private data */ 45/* codec private data */
46struct wm8728_priv { 46struct wm8728_priv {
47 enum snd_soc_control_type control_type; 47 enum snd_soc_control_type control_type;
48 void *control_data;
49}; 48};
50 49
51static const DECLARE_TLV_DB_SCALE(wm8728_tlv, -12750, 50, 1); 50static const DECLARE_TLV_DB_SCALE(wm8728_tlv, -12750, 50, 1);
@@ -244,7 +243,6 @@ static int wm8728_probe(struct snd_soc_codec *codec)
244 struct wm8728_priv *wm8728 = snd_soc_codec_get_drvdata(codec); 243 struct wm8728_priv *wm8728 = snd_soc_codec_get_drvdata(codec);
245 int ret; 244 int ret;
246 245
247 codec->control_data = wm8728->control_data;
248 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8728->control_type); 246 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8728->control_type);
249 if (ret < 0) { 247 if (ret < 0) {
250 printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n", 248 printk(KERN_ERR "wm8728: failed to configure cache I/O: %d\n",
@@ -289,7 +287,6 @@ static int __devinit wm8728_spi_probe(struct spi_device *spi)
289 if (wm8728 == NULL) 287 if (wm8728 == NULL)
290 return -ENOMEM; 288 return -ENOMEM;
291 289
292 wm8728->control_data = spi;
293 wm8728->control_type = SND_SOC_SPI; 290 wm8728->control_type = SND_SOC_SPI;
294 spi_set_drvdata(spi, wm8728); 291 spi_set_drvdata(spi, wm8728);
295 292
@@ -330,7 +327,6 @@ static __devinit int wm8728_i2c_probe(struct i2c_client *i2c,
330 return -ENOMEM; 327 return -ENOMEM;
331 328
332 i2c_set_clientdata(i2c, wm8728); 329 i2c_set_clientdata(i2c, wm8728);
333 wm8728->control_data = i2c;
334 wm8728->control_type = SND_SOC_I2C; 330 wm8728->control_type = SND_SOC_I2C;
335 331
336 ret = snd_soc_register_codec(&i2c->dev, 332 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 7da360ee1fee..19844fc8cb1d 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -43,7 +43,6 @@ static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = {
43/* codec private data */ 43/* codec private data */
44struct wm8731_priv { 44struct wm8731_priv {
45 enum snd_soc_control_type control_type; 45 enum snd_soc_control_type control_type;
46 void *control_data;
47 struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES]; 46 struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES];
48 u16 reg_cache[WM8731_CACHEREGNUM]; 47 u16 reg_cache[WM8731_CACHEREGNUM];
49 unsigned int sysclk; 48 unsigned int sysclk;
@@ -463,7 +462,6 @@ static int wm8731_probe(struct snd_soc_codec *codec)
463 int ret = 0, i; 462 int ret = 0, i;
464 463
465 codec->bias_level = SND_SOC_BIAS_OFF, 464 codec->bias_level = SND_SOC_BIAS_OFF,
466 codec->control_data = wm8731->control_data;
467 465
468 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8731->control_type); 466 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8731->control_type);
469 if (ret < 0) { 467 if (ret < 0) {
@@ -557,7 +555,6 @@ static int __devinit wm8731_spi_probe(struct spi_device *spi)
557 if (wm8731 == NULL) 555 if (wm8731 == NULL)
558 return -ENOMEM; 556 return -ENOMEM;
559 557
560 wm8731->control_data = spi;
561 wm8731->control_type = SND_SOC_SPI; 558 wm8731->control_type = SND_SOC_SPI;
562 spi_set_drvdata(spi, wm8731); 559 spi_set_drvdata(spi, wm8731);
563 560
@@ -598,7 +595,6 @@ static __devinit int wm8731_i2c_probe(struct i2c_client *i2c,
598 return -ENOMEM; 595 return -ENOMEM;
599 596
600 i2c_set_clientdata(i2c, wm8731); 597 i2c_set_clientdata(i2c, wm8731);
601 wm8731->control_data = i2c;
602 wm8731->control_type = SND_SOC_I2C; 598 wm8731->control_type = SND_SOC_I2C;
603 599
604 ret = snd_soc_register_codec(&i2c->dev, 600 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index 0c6d59e4d226..782fe539662b 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -41,7 +41,6 @@ static const char *wm8741_supply_names[WM8741_NUM_SUPPLIES] = {
41/* codec private data */ 41/* codec private data */
42struct wm8741_priv { 42struct wm8741_priv {
43 enum snd_soc_control_type control_type; 43 enum snd_soc_control_type control_type;
44 void *control_data;
45 u16 reg_cache[WM8741_REGISTER_COUNT]; 44 u16 reg_cache[WM8741_REGISTER_COUNT];
46 struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES]; 45 struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
47 unsigned int sysclk; 46 unsigned int sysclk;
@@ -347,7 +346,6 @@ static int wm8741_probe(struct snd_soc_codec *codec)
347 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); 346 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
348 int ret = 0; 347 int ret = 0;
349 348
350 codec->control_data = wm8741->control_data;
351 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8741->control_type); 349 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8741->control_type);
352 if (ret != 0) { 350 if (ret != 0) {
353 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 351 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -415,7 +413,6 @@ static int wm8741_i2c_probe(struct i2c_client *i2c,
415 } 413 }
416 414
417 i2c_set_clientdata(i2c, wm8741); 415 i2c_set_clientdata(i2c, wm8741);
418 wm8741->control_data = i2c;
419 wm8741->control_type = SND_SOC_I2C; 416 wm8741->control_type = SND_SOC_I2C;
420 417
421 ret = snd_soc_register_codec(&i2c->dev, 418 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 89863a5bc830..92d4b2aef93b 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -53,7 +53,6 @@ static const u16 wm8750_reg[] = {
53struct wm8750_priv { 53struct wm8750_priv {
54 unsigned int sysclk; 54 unsigned int sysclk;
55 enum snd_soc_control_type control_type; 55 enum snd_soc_control_type control_type;
56 void *control_data;
57 u16 reg_cache[ARRAY_SIZE(wm8750_reg)]; 56 u16 reg_cache[ARRAY_SIZE(wm8750_reg)];
58}; 57};
59 58
@@ -697,7 +696,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)
697 struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec); 696 struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec);
698 int reg, ret; 697 int reg, ret;
699 698
700 codec->control_data = wm8750->control_data;
701 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8750->control_type); 699 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8750->control_type);
702 if (ret < 0) { 700 if (ret < 0) {
703 printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret); 701 printk(KERN_ERR "wm8750: failed to set cache I/O: %d\n", ret);
@@ -764,7 +762,6 @@ static int __devinit wm8750_spi_probe(struct spi_device *spi)
764 if (wm8750 == NULL) 762 if (wm8750 == NULL)
765 return -ENOMEM; 763 return -ENOMEM;
766 764
767 wm8750->control_data = spi;
768 wm8750->control_type = SND_SOC_SPI; 765 wm8750->control_type = SND_SOC_SPI;
769 spi_set_drvdata(spi, wm8750); 766 spi_set_drvdata(spi, wm8750);
770 767
@@ -805,7 +802,6 @@ static __devinit int wm8750_i2c_probe(struct i2c_client *i2c,
805 return -ENOMEM; 802 return -ENOMEM;
806 803
807 i2c_set_clientdata(i2c, wm8750); 804 i2c_set_clientdata(i2c, wm8750);
808 wm8750->control_data = i2c;
809 wm8750->control_type = SND_SOC_I2C; 805 wm8750->control_type = SND_SOC_I2C;
810 806
811 ret = snd_soc_register_codec(&i2c->dev, 807 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 976e408b3616..484423248c26 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -86,7 +86,6 @@ static const u16 wm8753_reg[] = {
86/* codec private data */ 86/* codec private data */
87struct wm8753_priv { 87struct wm8753_priv {
88 enum snd_soc_control_type control_type; 88 enum snd_soc_control_type control_type;
89 void *control_data;
90 unsigned int sysclk; 89 unsigned int sysclk;
91 unsigned int pcmclk; 90 unsigned int pcmclk;
92 u16 reg_cache[ARRAY_SIZE(wm8753_reg)]; 91 u16 reg_cache[ARRAY_SIZE(wm8753_reg)];
@@ -1551,8 +1550,7 @@ static int wm8753_probe(struct snd_soc_codec *codec)
1551 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); 1550 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
1552 int ret = 0, reg; 1551 int ret = 0, reg;
1553 1552
1554 codec->bias_level = SND_SOC_BIAS_OFF, 1553 codec->bias_level = SND_SOC_BIAS_OFF;
1555 codec->control_data = wm8753->control_data;
1556 INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work); 1554 INIT_DELAYED_WORK(&codec->delayed_work, wm8753_work);
1557 1555
1558 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8753->control_type); 1556 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8753->control_type);
@@ -1637,7 +1635,6 @@ static int __devinit wm8753_spi_probe(struct spi_device *spi)
1637 if (wm8753 == NULL) 1635 if (wm8753 == NULL)
1638 return -ENOMEM; 1636 return -ENOMEM;
1639 1637
1640 wm8753->control_data = spi;
1641 wm8753->control_type = SND_SOC_SPI; 1638 wm8753->control_type = SND_SOC_SPI;
1642 spi_set_drvdata(spi, wm8753); 1639 spi_set_drvdata(spi, wm8753);
1643 1640
@@ -1678,7 +1675,6 @@ static __devinit int wm8753_i2c_probe(struct i2c_client *i2c,
1678 return -ENOMEM; 1675 return -ENOMEM;
1679 1676
1680 i2c_set_clientdata(i2c, wm8753); 1677 i2c_set_clientdata(i2c, wm8753);
1681 wm8753->control_data = i2c;
1682 wm8753->control_type = SND_SOC_I2C; 1678 wm8753->control_type = SND_SOC_I2C;
1683 1679
1684 ret = snd_soc_register_codec(&i2c->dev, 1680 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index 51a2d265d40e..053030679c1a 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -34,7 +34,6 @@
34/* codec private data */ 34/* codec private data */
35struct wm8776_priv { 35struct wm8776_priv {
36 enum snd_soc_control_type control_type; 36 enum snd_soc_control_type control_type;
37 void *control_data;
38 u16 reg_cache[WM8776_CACHEREGNUM]; 37 u16 reg_cache[WM8776_CACHEREGNUM];
39 int sysclk[2]; 38 int sysclk[2];
40}; 39};
@@ -415,7 +414,6 @@ static int wm8776_probe(struct snd_soc_codec *codec)
415 struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec); 414 struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec);
416 int ret = 0; 415 int ret = 0;
417 416
418 codec->control_data = wm8776->control_data;
419 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type); 417 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type);
420 if (ret < 0) { 418 if (ret < 0) {
421 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 419 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -472,7 +470,6 @@ static int __devinit wm8776_spi_probe(struct spi_device *spi)
472 if (wm8776 == NULL) 470 if (wm8776 == NULL)
473 return -ENOMEM; 471 return -ENOMEM;
474 472
475 wm8776->control_data = spi;
476 wm8776->control_type = SND_SOC_SPI; 473 wm8776->control_type = SND_SOC_SPI;
477 spi_set_drvdata(spi, wm8776); 474 spi_set_drvdata(spi, wm8776);
478 475
@@ -513,7 +510,6 @@ static __devinit int wm8776_i2c_probe(struct i2c_client *i2c,
513 return -ENOMEM; 510 return -ENOMEM;
514 511
515 i2c_set_clientdata(i2c, wm8776); 512 i2c_set_clientdata(i2c, wm8776);
516 wm8776->control_data = i2c;
517 wm8776->control_type = SND_SOC_I2C; 513 wm8776->control_type = SND_SOC_I2C;
518 514
519 ret = snd_soc_register_codec(&i2c->dev, 515 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 33c3b57f3f66..1378aab5ca75 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -140,7 +140,6 @@
140 140
141struct wm8900_priv { 141struct wm8900_priv {
142 enum snd_soc_control_type control_type; 142 enum snd_soc_control_type control_type;
143 void *control_data;
144 u16 reg_cache[WM8900_MAXREG]; 143 u16 reg_cache[WM8900_MAXREG];
145 144
146 u32 fll_in; /* FLL input frequency */ 145 u32 fll_in; /* FLL input frequency */
@@ -1189,7 +1188,6 @@ static int wm8900_probe(struct snd_soc_codec *codec)
1189 struct wm8900_priv *wm8900 = snd_soc_codec_get_drvdata(codec); 1188 struct wm8900_priv *wm8900 = snd_soc_codec_get_drvdata(codec);
1190 int ret = 0, reg; 1189 int ret = 0, reg;
1191 1190
1192 codec->control_data = wm8900->control_data;
1193 ret = snd_soc_codec_set_cache_io(codec, 8, 16, wm8900->control_type); 1191 ret = snd_soc_codec_set_cache_io(codec, 8, 16, wm8900->control_type);
1194 if (ret != 0) { 1192 if (ret != 0) {
1195 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 1193 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -1273,7 +1271,6 @@ static int __devinit wm8900_spi_probe(struct spi_device *spi)
1273 if (wm8900 == NULL) 1271 if (wm8900 == NULL)
1274 return -ENOMEM; 1272 return -ENOMEM;
1275 1273
1276 wm8900->control_data = spi;
1277 wm8900->control_type = SND_SOC_SPI; 1274 wm8900->control_type = SND_SOC_SPI;
1278 spi_set_drvdata(spi, wm8900); 1275 spi_set_drvdata(spi, wm8900);
1279 1276
@@ -1314,7 +1311,6 @@ static __devinit int wm8900_i2c_probe(struct i2c_client *i2c,
1314 return -ENOMEM; 1311 return -ENOMEM;
1315 1312
1316 i2c_set_clientdata(i2c, wm8900); 1313 i2c_set_clientdata(i2c, wm8900);
1317 wm8900->control_data = i2c;
1318 wm8900->control_type = SND_SOC_I2C; 1314 wm8900->control_type = SND_SOC_I2C;
1319 1315
1320 ret = snd_soc_register_codec(&i2c->dev, 1316 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index f5d73ed72cbd..622b60238a82 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -217,7 +217,6 @@ struct wm8903_priv {
217 u16 reg_cache[ARRAY_SIZE(wm8903_reg_defaults)]; 217 u16 reg_cache[ARRAY_SIZE(wm8903_reg_defaults)];
218 218
219 int sysclk; 219 int sysclk;
220 struct i2c_client *control_data;
221 int irq; 220 int irq;
222 221
223 /* Reference counts */ 222 /* Reference counts */
@@ -1639,7 +1638,6 @@ static int wm8903_probe(struct snd_soc_codec *codec)
1639 u16 val; 1638 u16 val;
1640 1639
1641 init_completion(&wm8903->wseq); 1640 init_completion(&wm8903->wseq);
1642 codec->control_data = wm8903->control_data;
1643 1641
1644 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C); 1642 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
1645 if (ret != 0) { 1643 if (ret != 0) {
@@ -1779,7 +1777,6 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c,
1779 return -ENOMEM; 1777 return -ENOMEM;
1780 1778
1781 i2c_set_clientdata(i2c, wm8903); 1779 i2c_set_clientdata(i2c, wm8903);
1782 wm8903->control_data = i2c;
1783 wm8903->irq = i2c->irq; 1780 wm8903->irq = i2c->irq;
1784 1781
1785 ret = snd_soc_register_codec(&i2c->dev, 1782 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index a5a9f8ef5771..f89ad6c9a80b 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -41,7 +41,6 @@ static const char *wm8955_supply_names[WM8955_NUM_SUPPLIES] = {
41/* codec private data */ 41/* codec private data */
42struct wm8955_priv { 42struct wm8955_priv {
43 enum snd_soc_control_type control_type; 43 enum snd_soc_control_type control_type;
44 void *control_data;
45 44
46 u16 reg_cache[WM8955_MAX_REGISTER + 1]; 45 u16 reg_cache[WM8955_MAX_REGISTER + 1];
47 46
@@ -904,7 +903,6 @@ static int wm8955_probe(struct snd_soc_codec *codec)
904 struct wm8955_pdata *pdata = dev_get_platdata(codec->dev); 903 struct wm8955_pdata *pdata = dev_get_platdata(codec->dev);
905 int ret, i; 904 int ret, i;
906 905
907 codec->control_data = wm8955->control_data;
908 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8955->control_type); 906 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8955->control_type);
909 if (ret != 0) { 907 if (ret != 0) {
910 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 908 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -1004,7 +1002,6 @@ static __devinit int wm8955_i2c_probe(struct i2c_client *i2c,
1004 return -ENOMEM; 1002 return -ENOMEM;
1005 1003
1006 i2c_set_clientdata(i2c, wm8955); 1004 i2c_set_clientdata(i2c, wm8955);
1007 wm8955->control_data = i2c;
1008 1005
1009 ret = snd_soc_register_codec(&i2c->dev, 1006 ret = snd_soc_register_codec(&i2c->dev,
1010 &soc_codec_dev_wm8955, &wm8955_dai, 1); 1007 &soc_codec_dev_wm8955, &wm8955_dai, 1);
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index 5ebe2c04e5cf..fa36a62972f8 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -289,7 +289,6 @@ static u16 wm8961_reg_defaults[] = {
289 289
290struct wm8961_priv { 290struct wm8961_priv {
291 enum snd_soc_control_type control_type; 291 enum snd_soc_control_type control_type;
292 void *control_data;
293 int sysclk; 292 int sysclk;
294 u16 reg_cache[WM8961_MAX_REGISTER]; 293 u16 reg_cache[WM8961_MAX_REGISTER];
295}; 294};
@@ -964,7 +963,6 @@ static int wm8961_probe(struct snd_soc_codec *codec)
964 int ret = 0; 963 int ret = 0;
965 u16 reg; 964 u16 reg;
966 965
967 codec->control_data = wm8961->control_data;
968 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C); 966 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
969 if (ret != 0) { 967 if (ret != 0) {
970 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 968 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -1096,7 +1094,6 @@ static __devinit int wm8961_i2c_probe(struct i2c_client *i2c,
1096 return -ENOMEM; 1094 return -ENOMEM;
1097 1095
1098 i2c_set_clientdata(i2c, wm8961); 1096 i2c_set_clientdata(i2c, wm8961);
1099 wm8961->control_data = i2c;
1100 1097
1101 ret = snd_soc_register_codec(&i2c->dev, 1098 ret = snd_soc_register_codec(&i2c->dev,
1102 &soc_codec_dev_wm8961, &wm8961_dai, 1); 1099 &soc_codec_dev_wm8961, &wm8961_dai, 1);
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index ad2692afbb31..1d460735c4d3 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -39,7 +39,6 @@ static struct workqueue_struct *wm8971_workq = NULL;
39/* codec private data */ 39/* codec private data */
40struct wm8971_priv { 40struct wm8971_priv {
41 enum snd_soc_control_type control_type; 41 enum snd_soc_control_type control_type;
42 void *control_data;
43 unsigned int sysclk; 42 unsigned int sysclk;
44}; 43};
45 44
@@ -642,7 +641,6 @@ static int wm8971_probe(struct snd_soc_codec *codec)
642 641
643 pr_info("WM8971 Audio Codec %s", WM8971_VERSION); 642 pr_info("WM8971 Audio Codec %s", WM8971_VERSION);
644 643
645 codec->control_data = wm8971->control_data;
646 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8971->control_type); 644 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8971->control_type);
647 if (ret < 0) { 645 if (ret < 0) {
648 printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret); 646 printk(KERN_ERR "wm8971: failed to set cache I/O: %d\n", ret);
@@ -725,7 +723,6 @@ static __devinit int wm8971_i2c_probe(struct i2c_client *i2c,
725 return -ENOMEM; 723 return -ENOMEM;
726 724
727 i2c_set_clientdata(i2c, wm8971); 725 i2c_set_clientdata(i2c, wm8971);
728 wm8971->control_data = i2c;
729 726
730 ret = snd_soc_register_codec(&i2c->dev, 727 ret = snd_soc_register_codec(&i2c->dev,
731 &soc_codec_dev_wm8971, &wm8971_dai, 1); 728 &soc_codec_dev_wm8971, &wm8971_dai, 1);
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index 52f631c62e29..e61728b7339f 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -52,7 +52,6 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = {
52 52
53struct wm8974_priv { 53struct wm8974_priv {
54 enum snd_soc_control_type control_type; 54 enum snd_soc_control_type control_type;
55 void *control_data;
56 u16 reg_cache[WM8974_CACHEREGNUM]; 55 u16 reg_cache[WM8974_CACHEREGNUM];
57}; 56};
58 57
@@ -611,7 +610,6 @@ static int wm8974_probe(struct snd_soc_codec *codec)
611 struct wm8974_priv *wm8974 = snd_soc_codec_get_drvdata(codec); 610 struct wm8974_priv *wm8974 = snd_soc_codec_get_drvdata(codec);
612 int ret = 0; 611 int ret = 0;
613 612
614 codec->control_data = wm8974->control_data;
615 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_I2C); 613 ret = snd_soc_codec_set_cache_io(codec, 7, 9, SND_SOC_I2C);
616 if (ret < 0) { 614 if (ret < 0) {
617 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 615 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -662,7 +660,6 @@ static __devinit int wm8974_i2c_probe(struct i2c_client *i2c,
662 return -ENOMEM; 660 return -ENOMEM;
663 661
664 i2c_set_clientdata(i2c, wm8974); 662 i2c_set_clientdata(i2c, wm8974);
665 wm8974->control_data = i2c;
666 663
667 ret = snd_soc_register_codec(&i2c->dev, 664 ret = snd_soc_register_codec(&i2c->dev,
668 &soc_codec_dev_wm8974, &wm8974_dai, 1); 665 &soc_codec_dev_wm8974, &wm8974_dai, 1);
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index ecbffcea71db..d070a58e4f8e 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -53,7 +53,6 @@ static const u16 wm8988_reg[] = {
53struct wm8988_priv { 53struct wm8988_priv {
54 unsigned int sysclk; 54 unsigned int sysclk;
55 enum snd_soc_control_type control_type; 55 enum snd_soc_control_type control_type;
56 void *control_data;
57 struct snd_pcm_hw_constraint_list *sysclk_constraints; 56 struct snd_pcm_hw_constraint_list *sysclk_constraints;
58 u16 reg_cache[WM8988_NUM_REG]; 57 u16 reg_cache[WM8988_NUM_REG];
59}; 58};
@@ -763,7 +762,6 @@ static int wm8988_probe(struct snd_soc_codec *codec)
763 int ret = 0; 762 int ret = 0;
764 u16 reg; 763 u16 reg;
765 764
766 codec->control_data = wm8988->control_data;
767 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type); 765 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type);
768 if (ret < 0) { 766 if (ret < 0) {
769 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret); 767 dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
@@ -826,7 +824,6 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)
826 if (wm8988 == NULL) 824 if (wm8988 == NULL)
827 return -ENOMEM; 825 return -ENOMEM;
828 826
829 wm8988->control_data = spi;
830 wm8988->control_type = SND_SOC_SPI; 827 wm8988->control_type = SND_SOC_SPI;
831 spi_set_drvdata(spi, wm8988); 828 spi_set_drvdata(spi, wm8988);
832 829
@@ -867,7 +864,6 @@ static __devinit int wm8988_i2c_probe(struct i2c_client *i2c,
867 return -ENOMEM; 864 return -ENOMEM;
868 865
869 i2c_set_clientdata(i2c, wm8988); 866 i2c_set_clientdata(i2c, wm8988);
870 wm8988->control_data = i2c;
871 wm8988->control_type = SND_SOC_I2C; 867 wm8988->control_type = SND_SOC_I2C;
872 868
873 ret = snd_soc_register_codec(&i2c->dev, 869 ret = snd_soc_register_codec(&i2c->dev,
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index b25243382966..0ffecbd1e33b 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -33,7 +33,6 @@
33/* codec private data */ 33/* codec private data */
34struct wm8990_priv { 34struct wm8990_priv {
35 enum snd_soc_control_type control_type; 35 enum snd_soc_control_type control_type;
36 void *control_data;
37 unsigned int sysclk; 36 unsigned int sysclk;
38 unsigned int pcmclk; 37 unsigned int pcmclk;
39}; 38};
@@ -1343,11 +1342,9 @@ static int wm8990_resume(struct snd_soc_codec *codec)
1343 */ 1342 */
1344static int wm8990_probe(struct snd_soc_codec *codec) 1343static int wm8990_probe(struct snd_soc_codec *codec)
1345{ 1344{
1346 struct wm8990_priv *wm8990 = snd_soc_codec_get_drvdata(codec);
1347 int ret; 1345 int ret;
1348 u16 reg; 1346 u16 reg;
1349 1347
1350 codec->control_data = wm8990->control_data;
1351 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C); 1348 ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
1352 if (ret < 0) { 1349 if (ret < 0) {
1353 printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret); 1350 printk(KERN_ERR "wm8990: failed to set cache I/O: %d\n", ret);
@@ -1410,7 +1407,6 @@ static __devinit int wm8990_i2c_probe(struct i2c_client *i2c,
1410 return -ENOMEM; 1407 return -ENOMEM;
1411 1408
1412 i2c_set_clientdata(i2c, wm8990); 1409 i2c_set_clientdata(i2c, wm8990);
1413 wm8990->control_data = i2c;
1414 1410
1415 ret = snd_soc_register_codec(&i2c->dev, 1411 ret = snd_soc_register_codec(&i2c->dev,
1416 &soc_codec_dev_wm8990, &wm8990_dai, 1); 1412 &soc_codec_dev_wm8990, &wm8990_dai, 1);
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 1d9e1837a2df..a3fd6b935804 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -230,7 +230,6 @@ struct wm8993_priv {
230 struct regulator_bulk_data supplies[WM8993_NUM_SUPPLIES]; 230 struct regulator_bulk_data supplies[WM8993_NUM_SUPPLIES];
231 struct wm8993_platform_data pdata; 231 struct wm8993_platform_data pdata;
232 enum snd_soc_control_type control_type; 232 enum snd_soc_control_type control_type;
233 void *control_data;
234 int master; 233 int master;
235 int sysclk_source; 234 int sysclk_source;
236 int tdm_slots; 235 int tdm_slots;
@@ -1425,7 +1424,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
1425 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec); 1424 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
1426 int ret, i, val; 1425 int ret, i, val;
1427 1426
1428 codec->control_data = wm8993->control_data;
1429 wm8993->hubs_data.hp_startup_mode = 1; 1427 wm8993->hubs_data.hp_startup_mode = 1;
1430 wm8993->hubs_data.dcs_codes = -2; 1428 wm8993->hubs_data.dcs_codes = -2;
1431 1429
@@ -1606,7 +1604,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
1606 return -ENOMEM; 1604 return -ENOMEM;
1607 1605
1608 i2c_set_clientdata(i2c, wm8993); 1606 i2c_set_clientdata(i2c, wm8993);
1609 wm8993->control_data = i2c;
1610 1607
1611 ret = snd_soc_register_codec(&i2c->dev, 1608 ret = snd_soc_register_codec(&i2c->dev,
1612 &soc_codec_dev_wm8993, &wm8993_dai, 1); 1609 &soc_codec_dev_wm8993, &wm8993_dai, 1);