diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2010-10-13 04:30:31 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-10-13 05:35:05 -0400 |
commit | 7750752a22cbf7760f0073d218c737f5a03bff4a (patch) | |
tree | 21d289204b7059561af5f887df70a86422248b4a /sound/soc/codecs/ac97.c | |
parent | 00545785d7e355b0b1b9fb820ec70cb2ae51b409 (diff) |
ASoC: ac97: don't call snd_soc_new_ac97_codec at probe
It is not needed since snd_ac97_mixer() will create a new ac97 object for us.
Removing the call also fixes a memory leak since codec->ac97 is set to NULL at
the beginning of snd_ac97_mixer().
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ac97.c')
-rw-r--r-- | sound/soc/codecs/ac97.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 2c824a588756..f5139ae51d82 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -79,12 +79,6 @@ static int ac97_soc_probe(struct snd_soc_codec *codec) | |||
79 | struct snd_ac97_template ac97_template; | 79 | struct snd_ac97_template ac97_template; |
80 | int ret; | 80 | int ret; |
81 | 81 | ||
82 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | ||
83 | if (ret < 0) { | ||
84 | printk(KERN_ERR "ASoC: failed to init generic ac97 glue\n"); | ||
85 | return ret; | ||
86 | } | ||
87 | |||
88 | /* add codec as bus device for standard ac97 */ | 82 | /* add codec as bus device for standard ac97 */ |
89 | ret = snd_ac97_bus(codec->card->snd_card, 0, &soc_ac97_ops, NULL, &ac97_bus); | 83 | ret = snd_ac97_bus(codec->card->snd_card, 0, &soc_ac97_ops, NULL, &ac97_bus); |
90 | if (ret < 0) | 84 | if (ret < 0) |