diff options
Diffstat (limited to 'sound/soc/codecs/wm8400.c')
-rw-r--r-- | sound/soc/codecs/wm8400.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index b9ef4d915221..6acc885cf9b7 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/slab.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | #include <linux/pm.h> | 20 | #include <linux/pm.h> |
@@ -915,7 +916,6 @@ static int wm8400_add_widgets(struct snd_soc_codec *codec) | |||
915 | 916 | ||
916 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 917 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); |
917 | 918 | ||
918 | snd_soc_dapm_new_widgets(codec); | ||
919 | return 0; | 919 | return 0; |
920 | } | 920 | } |
921 | 921 | ||
@@ -1011,7 +1011,8 @@ static int fll_factors(struct wm8400_priv *wm8400, struct fll_factors *factors, | |||
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, | 1013 | static int wm8400_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, |
1014 | unsigned int freq_in, unsigned int freq_out) | 1014 | int source, unsigned int freq_in, |
1015 | unsigned int freq_out) | ||
1015 | { | 1016 | { |
1016 | struct snd_soc_codec *codec = codec_dai->codec; | 1017 | struct snd_soc_codec *codec = codec_dai->codec; |
1017 | struct wm8400_priv *wm8400 = codec->private_data; | 1018 | struct wm8400_priv *wm8400 = codec->private_data; |
@@ -1399,17 +1400,6 @@ static int wm8400_probe(struct platform_device *pdev) | |||
1399 | wm8400_add_controls(codec); | 1400 | wm8400_add_controls(codec); |
1400 | wm8400_add_widgets(codec); | 1401 | wm8400_add_widgets(codec); |
1401 | 1402 | ||
1402 | ret = snd_soc_init_card(socdev); | ||
1403 | if (ret < 0) { | ||
1404 | dev_err(&pdev->dev, "failed to register card\n"); | ||
1405 | goto card_err; | ||
1406 | } | ||
1407 | |||
1408 | return ret; | ||
1409 | |||
1410 | card_err: | ||
1411 | snd_soc_free_pcms(socdev); | ||
1412 | snd_soc_dapm_free(socdev); | ||
1413 | pcm_err: | 1403 | pcm_err: |
1414 | return ret; | 1404 | return ret; |
1415 | } | 1405 | } |
@@ -1558,21 +1548,6 @@ static int __exit wm8400_codec_remove(struct platform_device *dev) | |||
1558 | return 0; | 1548 | return 0; |
1559 | } | 1549 | } |
1560 | 1550 | ||
1561 | #ifdef CONFIG_PM | ||
1562 | static int wm8400_pdev_suspend(struct platform_device *pdev, pm_message_t msg) | ||
1563 | { | ||
1564 | return snd_soc_suspend_device(&pdev->dev); | ||
1565 | } | ||
1566 | |||
1567 | static int wm8400_pdev_resume(struct platform_device *pdev) | ||
1568 | { | ||
1569 | return snd_soc_resume_device(&pdev->dev); | ||
1570 | } | ||
1571 | #else | ||
1572 | #define wm8400_pdev_suspend NULL | ||
1573 | #define wm8400_pdev_resume NULL | ||
1574 | #endif | ||
1575 | |||
1576 | static struct platform_driver wm8400_codec_driver = { | 1551 | static struct platform_driver wm8400_codec_driver = { |
1577 | .driver = { | 1552 | .driver = { |
1578 | .name = "wm8400-codec", | 1553 | .name = "wm8400-codec", |
@@ -1580,8 +1555,6 @@ static struct platform_driver wm8400_codec_driver = { | |||
1580 | }, | 1555 | }, |
1581 | .probe = wm8400_codec_probe, | 1556 | .probe = wm8400_codec_probe, |
1582 | .remove = __exit_p(wm8400_codec_remove), | 1557 | .remove = __exit_p(wm8400_codec_remove), |
1583 | .suspend = wm8400_pdev_suspend, | ||
1584 | .resume = wm8400_pdev_resume, | ||
1585 | }; | 1558 | }; |
1586 | 1559 | ||
1587 | static int __init wm8400_codec_init(void) | 1560 | static int __init wm8400_codec_init(void) |