aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8940.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8940.c')
-rw-r--r--sound/soc/codecs/wm8940.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c
index de9ec9b8b7d9..14039ea2f3e4 100644
--- a/sound/soc/codecs/wm8940.c
+++ b/sound/soc/codecs/wm8940.c
@@ -28,7 +28,6 @@
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/pm.h> 29#include <linux/pm.h>
30#include <linux/i2c.h> 30#include <linux/i2c.h>
31#include <linux/platform_device.h>
32#include <linux/spi/spi.h> 31#include <linux/spi/spi.h>
33#include <linux/slab.h> 32#include <linux/slab.h>
34#include <sound/core.h> 33#include <sound/core.h>
@@ -629,8 +628,8 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
629 ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 5)); 628 ret = snd_soc_write(codec, WM8940_CLOCK, reg | (div << 5));
630 break; 629 break;
631 case WM8940_OPCLKDIV: 630 case WM8940_OPCLKDIV:
632 reg = snd_soc_read(codec, WM8940_ADDCNTRL) & 0xFFCF; 631 reg = snd_soc_read(codec, WM8940_GPIO) & 0xFFCF;
633 ret = snd_soc_write(codec, WM8940_ADDCNTRL, reg | (div << 4)); 632 ret = snd_soc_write(codec, WM8940_GPIO, reg | (div << 4));
634 break; 633 break;
635 } 634 }
636 return ret; 635 return ret;
@@ -644,7 +643,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
644 SNDRV_PCM_FMTBIT_S24_LE | \ 643 SNDRV_PCM_FMTBIT_S24_LE | \
645 SNDRV_PCM_FMTBIT_S32_LE) 644 SNDRV_PCM_FMTBIT_S32_LE)
646 645
647static struct snd_soc_dai_ops wm8940_dai_ops = { 646static const struct snd_soc_dai_ops wm8940_dai_ops = {
648 .hw_params = wm8940_i2s_hw_params, 647 .hw_params = wm8940_i2s_hw_params,
649 .set_sysclk = wm8940_set_dai_sysclk, 648 .set_sysclk = wm8940_set_dai_sysclk,
650 .digital_mute = wm8940_mute, 649 .digital_mute = wm8940_mute,
@@ -673,7 +672,7 @@ static struct snd_soc_dai_driver wm8940_dai = {
673 .symmetric_rates = 1, 672 .symmetric_rates = 1,
674}; 673};
675 674
676static int wm8940_suspend(struct snd_soc_codec *codec, pm_message_t state) 675static int wm8940_suspend(struct snd_soc_codec *codec)
677{ 676{
678 return wm8940_set_bias_level(codec, SND_SOC_BIAS_OFF); 677 return wm8940_set_bias_level(codec, SND_SOC_BIAS_OFF);
679} 678}
@@ -780,7 +779,7 @@ MODULE_DEVICE_TABLE(i2c, wm8940_i2c_id);
780 779
781static struct i2c_driver wm8940_i2c_driver = { 780static struct i2c_driver wm8940_i2c_driver = {
782 .driver = { 781 .driver = {
783 .name = "wm8940-codec", 782 .name = "wm8940",
784 .owner = THIS_MODULE, 783 .owner = THIS_MODULE,
785 }, 784 },
786 .probe = wm8940_i2c_probe, 785 .probe = wm8940_i2c_probe,