Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ak4104', 'asoc/topic...
[cascardo/linux.git] / sound / soc / soc-core.c
index 16369ca..7440d16 100644 (file)
@@ -1056,7 +1056,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
        if (!rtd->platform) {
                dev_err(card->dev, "ASoC: platform %s not registered\n",
                        dai_link->platform_name);
-               return -EPROBE_DEFER;
+               goto _err_defer;
        }
 
        soc_add_pcm_runtime(card, rtd);
@@ -2083,14 +2083,13 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
        /* remove auxiliary devices */
        soc_remove_aux_devices(card);
 
+       snd_soc_dapm_free(&card->dapm);
        soc_cleanup_card_debugfs(card);
 
        /* remove the card */
        if (card->remove)
                card->remove(card);
 
-       snd_soc_dapm_free(&card->dapm);
-
        snd_card_free(card->snd_card);
        return 0;
 
@@ -3333,19 +3332,6 @@ int snd_soc_register_codec(struct device *dev,
        if (ret)
                goto err_free;
 
-       if (codec_drv->controls) {
-               codec->component.controls = codec_drv->controls;
-               codec->component.num_controls = codec_drv->num_controls;
-       }
-       if (codec_drv->dapm_widgets) {
-               codec->component.dapm_widgets = codec_drv->dapm_widgets;
-               codec->component.num_dapm_widgets = codec_drv->num_dapm_widgets;
-       }
-       if (codec_drv->dapm_routes) {
-               codec->component.dapm_routes = codec_drv->dapm_routes;
-               codec->component.num_dapm_routes = codec_drv->num_dapm_routes;
-       }
-
        if (codec_drv->probe)
                codec->component.probe = snd_soc_codec_drv_probe;
        if (codec_drv->remove)