diff options
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r-- | sound/soc/codecs/wm8731.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index a7c9ae17fc7e..8821af70e660 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/regulator/consumer.h> | 22 | #include <linux/regulator/consumer.h> |
24 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
25 | #include <linux/of_device.h> | 24 | #include <linux/of_device.h> |
@@ -465,7 +464,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec, | |||
465 | #define WM8731_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ | 464 | #define WM8731_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ |
466 | SNDRV_PCM_FMTBIT_S24_LE) | 465 | SNDRV_PCM_FMTBIT_S24_LE) |
467 | 466 | ||
468 | static struct snd_soc_dai_ops wm8731_dai_ops = { | 467 | static const struct snd_soc_dai_ops wm8731_dai_ops = { |
469 | .hw_params = wm8731_hw_params, | 468 | .hw_params = wm8731_hw_params, |
470 | .digital_mute = wm8731_mute, | 469 | .digital_mute = wm8731_mute, |
471 | .set_sysclk = wm8731_set_dai_sysclk, | 470 | .set_sysclk = wm8731_set_dai_sysclk, |
@@ -491,7 +490,7 @@ static struct snd_soc_dai_driver wm8731_dai = { | |||
491 | }; | 490 | }; |
492 | 491 | ||
493 | #ifdef CONFIG_PM | 492 | #ifdef CONFIG_PM |
494 | static int wm8731_suspend(struct snd_soc_codec *codec, pm_message_t state) | 493 | static int wm8731_suspend(struct snd_soc_codec *codec) |
495 | { | 494 | { |
496 | wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF); | 495 | wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF); |
497 | 496 | ||
@@ -554,9 +553,6 @@ static int wm8731_probe(struct snd_soc_codec *codec) | |||
554 | /* Disable bypass path by default */ | 553 | /* Disable bypass path by default */ |
555 | snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0); | 554 | snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0); |
556 | 555 | ||
557 | snd_soc_add_controls(codec, wm8731_snd_controls, | ||
558 | ARRAY_SIZE(wm8731_snd_controls)); | ||
559 | |||
560 | /* Regulators will have been enabled by bias management */ | 556 | /* Regulators will have been enabled by bias management */ |
561 | regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); | 557 | regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); |
562 | 558 | ||
@@ -596,6 +592,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8731 = { | |||
596 | .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), | 592 | .num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets), |
597 | .dapm_routes = wm8731_intercon, | 593 | .dapm_routes = wm8731_intercon, |
598 | .num_dapm_routes = ARRAY_SIZE(wm8731_intercon), | 594 | .num_dapm_routes = ARRAY_SIZE(wm8731_intercon), |
595 | .controls = wm8731_snd_controls, | ||
596 | .num_controls = ARRAY_SIZE(wm8731_snd_controls), | ||
599 | }; | 597 | }; |
600 | 598 | ||
601 | static const struct of_device_id wm8731_of_match[] = { | 599 | static const struct of_device_id wm8731_of_match[] = { |