diff options
Diffstat (limited to 'sound/soc/codecs/wm8711.c')
-rw-r--r-- | sound/soc/codecs/wm8711.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8711.c b/sound/soc/codecs/wm8711.c index 076bdb9930a..0b76d1dca5e 100644 --- a/sound/soc/codecs/wm8711.c +++ b/sound/soc/codecs/wm8711.c @@ -18,7 +18,6 @@ #include <linux/delay.h> #include <linux/pm.h> #include <linux/i2c.h> -#include <linux/platform_device.h> #include <linux/spi/spi.h> #include <linux/slab.h> #include <linux/of_device.h> @@ -318,7 +317,7 @@ static int wm8711_set_bias_level(struct snd_soc_codec *codec, #define WM8711_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) -static struct snd_soc_dai_ops wm8711_ops = { +static const struct snd_soc_dai_ops wm8711_ops = { .prepare = wm8711_pcm_prepare, .hw_params = wm8711_hw_params, .shutdown = wm8711_shutdown, @@ -339,7 +338,7 @@ static struct snd_soc_dai_driver wm8711_dai = { .ops = &wm8711_ops, }; -static int wm8711_suspend(struct snd_soc_codec *codec, pm_message_t state) +static int wm8711_suspend(struct snd_soc_codec *codec) { snd_soc_write(codec, WM8711_ACTIVE, 0x0); wm8711_set_bias_level(codec, SND_SOC_BIAS_OFF); @@ -375,9 +374,6 @@ static int wm8711_probe(struct snd_soc_codec *codec) snd_soc_update_bits(codec, WM8711_LOUT1V, 0x0100, 0x0100); snd_soc_update_bits(codec, WM8711_ROUT1V, 0x0100, 0x0100); - snd_soc_add_controls(codec, wm8711_snd_controls, - ARRAY_SIZE(wm8711_snd_controls)); - return ret; } @@ -398,6 +394,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8711 = { .reg_cache_size = ARRAY_SIZE(wm8711_reg), .reg_word_size = sizeof(u16), .reg_cache_default = wm8711_reg, + .controls = wm8711_snd_controls, + .num_controls = ARRAY_SIZE(wm8711_snd_controls), .dapm_widgets = wm8711_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm8711_dapm_widgets), .dapm_routes = wm8711_intercon, |