From fe3e78e073d25308756f38019956061153267769 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 3 Nov 2009 22:13:13 +0000 Subject: ASoC: Factor out snd_soc_init_card() snd_soc_init_card() is always called as the last part of the CODEC probe function so we can factor it out into the core card setup rather than have each CODEC replicate the code to do the initialiastation. This will be required to support multiple CODECs per card. Signed-off-by: Mark Brown --- sound/soc/codecs/cx20442.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sound/soc/codecs/cx20442.c') diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index 38eac9c866e..d7f9bf18b72 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -355,12 +355,6 @@ static int cx20442_codec_probe(struct platform_device *pdev) cx20442_add_widgets(codec); - ret = snd_soc_init_card(socdev); - if (ret < 0) { - dev_err(&pdev->dev, "failed to register card\n"); - goto card_err; - } - return ret; card_err: -- cgit v1.2.3 From 4cae37fa98f4d50778161ec033122444e3c10a01 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sat, 7 Nov 2009 10:18:22 +0100 Subject: ASoC: Remove dead code and labels Remove the dead code and labels "card_err" in the error paths of some codec drivers. Signed-off-by: Takashi Iwai --- sound/soc/codecs/cx20442.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sound/soc/codecs/cx20442.c') diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index d7f9bf18b72..dda751c885c 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -355,11 +355,6 @@ static int cx20442_codec_probe(struct platform_device *pdev) cx20442_add_widgets(codec); - return ret; - -card_err: - snd_soc_free_pcms(socdev); - snd_soc_dapm_free(socdev); pcm_err: return ret; } -- cgit v1.2.3 From 0a3f5e35aae43b20fef09fd800cf52cc9a2d61a8 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 12 Nov 2009 23:15:08 +0000 Subject: ASoC: Remove redundant snd_soc_dapm_new_widgets() calls The DAPM widgets are now insntantiated by the core when creating the card so there is no need for the individual CODEC drivers to do so. Signed-off-by: Mark Brown --- sound/soc/codecs/cx20442.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/soc/codecs/cx20442.c') diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index dda751c885c..e000cdfec1e 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -93,7 +93,6 @@ static int cx20442_add_widgets(struct snd_soc_codec *codec) snd_soc_dapm_add_routes(codec, cx20442_audio_map, ARRAY_SIZE(cx20442_audio_map)); - snd_soc_dapm_new_widgets(codec); return 0; } -- cgit v1.2.3