aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8523.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8523.c')
-rw-r--r--sound/soc/codecs/wm8523.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 25870a4652fb..19cd47293424 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -19,6 +19,7 @@
19#include <linux/i2c.h> 19#include <linux/i2c.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/regulator/consumer.h> 21#include <linux/regulator/consumer.h>
22#include <linux/slab.h>
22#include <sound/core.h> 23#include <sound/core.h>
23#include <sound/pcm.h> 24#include <sound/pcm.h>
24#include <sound/pcm_params.h> 25#include <sound/pcm_params.h>
@@ -117,7 +118,6 @@ static int wm8523_add_widgets(struct snd_soc_codec *codec)
117 118
118 snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); 119 snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
119 120
120 snd_soc_dapm_new_widgets(codec);
121 return 0; 121 return 0;
122} 122}
123 123
@@ -448,17 +448,9 @@ static int wm8523_probe(struct platform_device *pdev)
448 snd_soc_add_controls(codec, wm8523_snd_controls, 448 snd_soc_add_controls(codec, wm8523_snd_controls,
449 ARRAY_SIZE(wm8523_snd_controls)); 449 ARRAY_SIZE(wm8523_snd_controls));
450 wm8523_add_widgets(codec); 450 wm8523_add_widgets(codec);
451 ret = snd_soc_init_card(socdev);
452 if (ret < 0) {
453 dev_err(codec->dev, "failed to register card: %d\n", ret);
454 goto card_err;
455 }
456 451
457 return ret; 452 return ret;
458 453
459card_err:
460 snd_soc_free_pcms(socdev);
461 snd_soc_dapm_free(socdev);
462pcm_err: 454pcm_err:
463 return ret; 455 return ret;
464} 456}
@@ -638,21 +630,6 @@ static __devexit int wm8523_i2c_remove(struct i2c_client *client)
638 return 0; 630 return 0;
639} 631}
640 632
641#ifdef CONFIG_PM
642static int wm8523_i2c_suspend(struct i2c_client *i2c, pm_message_t msg)
643{
644 return snd_soc_suspend_device(&i2c->dev);
645}
646
647static int wm8523_i2c_resume(struct i2c_client *i2c)
648{
649 return snd_soc_resume_device(&i2c->dev);
650}
651#else
652#define wm8523_i2c_suspend NULL
653#define wm8523_i2c_resume NULL
654#endif
655
656static const struct i2c_device_id wm8523_i2c_id[] = { 633static const struct i2c_device_id wm8523_i2c_id[] = {
657 { "wm8523", 0 }, 634 { "wm8523", 0 },
658 { } 635 { }
@@ -666,8 +643,6 @@ static struct i2c_driver wm8523_i2c_driver = {
666 }, 643 },
667 .probe = wm8523_i2c_probe, 644 .probe = wm8523_i2c_probe,
668 .remove = __devexit_p(wm8523_i2c_remove), 645 .remove = __devexit_p(wm8523_i2c_remove),
669 .suspend = wm8523_i2c_suspend,
670 .resume = wm8523_i2c_resume,
671 .id_table = wm8523_i2c_id, 646 .id_table = wm8523_i2c_id,
672}; 647};
673#endif 648#endif