ASoC: qcom: use asoc_dummy_dlc
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 24 Apr 2023 02:36:44 +0000 (02:36 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 7 May 2023 23:47:10 +0000 (08:47 +0900)
Now we can share asoc_dummy_dlc. This patch use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87354q0zwj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org
sound/soc/qcom/common.c

index c1f24af..cab5a79 100644 (file)
@@ -140,17 +140,8 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
                        }
                } else {
                        /* DPCM frontend */
-                       dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL);
-                       if (!dlc) {
-                               ret = -ENOMEM;
-                               goto err;
-                       }
-
-                       link->codecs     = dlc;
+                       link->codecs     = &asoc_dummy_dlc;
                        link->num_codecs = 1;
-
-                       link->codecs->dai_name = "snd-soc-dummy-dai";
-                       link->codecs->name = "snd-soc-dummy";
                        link->dynamic = 1;
                }