Merge remote-tracking branches 'asoc/topic/nau8810', 'asoc/topic/of-bool', 'asoc...
[cascardo/linux.git] / sound / soc / soc-core.c
index 16369ca..c0bbcd9 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)
@@ -3733,7 +3719,7 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
         * SND_SOC_DAIFMT_CLOCK_MASK area
         */
        snprintf(prop, sizeof(prop), "%scontinuous-clock", prefix);
-       if (of_get_property(np, prop, NULL))
+       if (of_property_read_bool(np, prop))
                format |= SND_SOC_DAIFMT_CONT;
        else
                format |= SND_SOC_DAIFMT_GATED;