aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8711.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8711.c')
-rw-r--r--sound/soc/codecs/wm8711.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c
index 076bdb9930a1..0b76d1dca5ea 100644
--- a/sound/soc/codecs/wm8711.c
+++ b/sound/soc/codecs/wm8711.c
@@ -18,7 +18,6 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/pm.h> 19#include <linux/pm.h>
20#include <linux/i2c.h> 20#include <linux/i2c.h>
21#include <linux/platform_device.h>
22#include <linux/spi/spi.h> 21#include <linux/spi/spi.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/of_device.h> 23#include <linux/of_device.h>
@@ -318,7 +317,7 @@ static int wm8711_set_bias_level(struct snd_soc_codec *codec,
318#define WM8711_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 317#define WM8711_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
319 SNDRV_PCM_FMTBIT_S24_LE) 318 SNDRV_PCM_FMTBIT_S24_LE)
320 319
321static struct snd_soc_dai_ops wm8711_ops = { 320static const struct snd_soc_dai_ops wm8711_ops = {
322 .prepare = wm8711_pcm_prepare, 321 .prepare = wm8711_pcm_prepare,
323 .hw_params = wm8711_hw_params, 322 .hw_params = wm8711_hw_params,
324 .shutdown = wm8711_shutdown, 323 .shutdown = wm8711_shutdown,
@@ -339,7 +338,7 @@ static struct snd_soc_dai_driver wm8711_dai = {
339 .ops = &wm8711_ops, 338 .ops = &wm8711_ops,
340}; 339};
341 340
342static int wm8711_suspend(struct snd_soc_codec *codec, pm_message_t state) 341static int wm8711_suspend(struct snd_soc_codec *codec)
343{ 342{
344 snd_soc_write(codec, WM8711_ACTIVE, 0x0); 343 snd_soc_write(codec, WM8711_ACTIVE, 0x0);
345 wm8711_set_bias_level(codec, SND_SOC_BIAS_OFF); 344 wm8711_set_bias_level(codec, SND_SOC_BIAS_OFF);
@@ -375,9 +374,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)
375 snd_soc_update_bits(codec, WM8711_LOUT1V, 0x0100, 0x0100); 374 snd_soc_update_bits(codec, WM8711_LOUT1V, 0x0100, 0x0100);
376 snd_soc_update_bits(codec, WM8711_ROUT1V, 0x0100, 0x0100); 375 snd_soc_update_bits(codec, WM8711_ROUT1V, 0x0100, 0x0100);
377 376
378 snd_soc_add_controls(codec, wm8711_snd_controls,
379 ARRAY_SIZE(wm8711_snd_controls));
380
381 return ret; 377 return ret;
382 378
383} 379}
@@ -398,6 +394,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8711 = {
398 .reg_cache_size = ARRAY_SIZE(wm8711_reg), 394 .reg_cache_size = ARRAY_SIZE(wm8711_reg),
399 .reg_word_size = sizeof(u16), 395 .reg_word_size = sizeof(u16),
400 .reg_cache_default = wm8711_reg, 396 .reg_cache_default = wm8711_reg,
397 .controls = wm8711_snd_controls,
398 .num_controls = ARRAY_SIZE(wm8711_snd_controls),
401 .dapm_widgets = wm8711_dapm_widgets, 399 .dapm_widgets = wm8711_dapm_widgets,
402 .num_dapm_widgets = ARRAY_SIZE(wm8711_dapm_widgets), 400 .num_dapm_widgets = ARRAY_SIZE(wm8711_dapm_widgets),
403 .dapm_routes = wm8711_intercon, 401 .dapm_routes = wm8711_intercon,