Merge remote-tracking branches 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/dapm...
[sfrench/cifs-2.6.git] / sound / soc / mediatek / mt8173 / mt8173-rt5650.c
index e69c141d8ed4c9a72d18187d1701c903cec41331..679fc8bea0a32fdff72dcef61673f42d401d3dd6 100644 (file)
@@ -51,8 +51,6 @@ static const struct snd_soc_dapm_route mt8173_rt5650_routes[] = {
        {"DMIC R1", NULL, "Int Mic"},
        {"Headphone", NULL, "HPOL"},
        {"Headphone", NULL, "HPOR"},
        {"DMIC R1", NULL, "Int Mic"},
        {"Headphone", NULL, "HPOL"},
        {"Headphone", NULL, "HPOR"},
-       {"Headset Mic", NULL, "micbias1"},
-       {"Headset Mic", NULL, "micbias2"},
        {"IN1P", NULL, "Headset Mic"},
        {"IN1N", NULL, "Headset Mic"},
 };
        {"IN1P", NULL, "Headset Mic"},
        {"IN1N", NULL, "Headset Mic"},
 };
@@ -274,15 +272,10 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev)
        }
        mt8173_rt5650_codecs[1].of_node = mt8173_rt5650_codecs[0].of_node;
 
        }
        mt8173_rt5650_codecs[1].of_node = mt8173_rt5650_codecs[0].of_node;
 
-       if (of_find_node_by_name(platform_node, "codec-capture")) {
-               np = of_get_child_by_name(pdev->dev.of_node, "codec-capture");
-               if (!np) {
-                       dev_err(&pdev->dev,
-                               "%s: Can't find codec-capture DT node\n",
-                               __func__);
-                       return -EINVAL;
-               }
+       np = of_get_child_by_name(pdev->dev.of_node, "codec-capture");
+       if (np) {
                ret = snd_soc_of_get_dai_name(np, &codec_capture_dai);
                ret = snd_soc_of_get_dai_name(np, &codec_capture_dai);
+               of_node_put(np);
                if (ret < 0) {
                        dev_err(&pdev->dev,
                                "%s codec_capture_dai name fail %d\n",
                if (ret < 0) {
                        dev_err(&pdev->dev,
                                "%s codec_capture_dai name fail %d\n",