diff options
Diffstat (limited to 'sound/soc/codecs/wm8510.c')
-rw-r--r-- | sound/soc/codecs/wm8510.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 7a169bff86f9..4ca724ff4c6e 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -564,7 +564,8 @@ static int wm8510_resume(struct platform_device *pdev) | |||
564 | * initialise the WM8510 driver | 564 | * initialise the WM8510 driver |
565 | * register the mixer and dsp interfaces with the kernel | 565 | * register the mixer and dsp interfaces with the kernel |
566 | */ | 566 | */ |
567 | static int wm8510_init(struct snd_soc_device *socdev) | 567 | static int wm8510_init(struct snd_soc_device *socdev, |
568 | enum snd_soc_control_type control) | ||
568 | { | 569 | { |
569 | struct snd_soc_codec *codec = socdev->card->codec; | 570 | struct snd_soc_codec *codec = socdev->card->codec; |
570 | int ret = 0; | 571 | int ret = 0; |
@@ -580,7 +581,7 @@ static int wm8510_init(struct snd_soc_device *socdev) | |||
580 | if (codec->reg_cache == NULL) | 581 | if (codec->reg_cache == NULL) |
581 | return -ENOMEM; | 582 | return -ENOMEM; |
582 | 583 | ||
583 | ret = snd_soc_codec_set_cache_io(codec, 7, 9); | 584 | ret = snd_soc_codec_set_cache_io(codec, 7, 9, control); |
584 | if (ret < 0) { | 585 | if (ret < 0) { |
585 | printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", | 586 | printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n", |
586 | ret); | 587 | ret); |
@@ -635,7 +636,7 @@ static int wm8510_i2c_probe(struct i2c_client *i2c, | |||
635 | i2c_set_clientdata(i2c, codec); | 636 | i2c_set_clientdata(i2c, codec); |
636 | codec->control_data = i2c; | 637 | codec->control_data = i2c; |
637 | 638 | ||
638 | ret = wm8510_init(socdev); | 639 | ret = wm8510_init(socdev, SND_SOC_I2C); |
639 | if (ret < 0) | 640 | if (ret < 0) |
640 | pr_err("failed to initialise WM8510\n"); | 641 | pr_err("failed to initialise WM8510\n"); |
641 | 642 | ||
@@ -715,7 +716,7 @@ static int __devinit wm8510_spi_probe(struct spi_device *spi) | |||
715 | 716 | ||
716 | codec->control_data = spi; | 717 | codec->control_data = spi; |
717 | 718 | ||
718 | ret = wm8510_init(socdev); | 719 | ret = wm8510_init(socdev, SND_SOC_SPI); |
719 | if (ret < 0) | 720 | if (ret < 0) |
720 | dev_err(&spi->dev, "failed to initialise WM8510\n"); | 721 | dev_err(&spi->dev, "failed to initialise WM8510\n"); |
721 | 722 | ||
@@ -784,7 +785,6 @@ static int wm8510_probe(struct platform_device *pdev) | |||
784 | wm8510_socdev = socdev; | 785 | wm8510_socdev = socdev; |
785 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 786 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |
786 | if (setup->i2c_address) { | 787 | if (setup->i2c_address) { |
787 | codec->hw_write = (hw_write_t)i2c_master_send; | ||
788 | ret = wm8510_add_i2c_device(pdev, setup); | 788 | ret = wm8510_add_i2c_device(pdev, setup); |
789 | } | 789 | } |
790 | #endif | 790 | #endif |