diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2023-04-24 04:36:52 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-05-08 01:47:10 +0200 |
commit | ccfc8750dbe18755532ee3d7c94d918f9f5aee1f (patch) | |
tree | 14692fb6c0f1ab9a41b8676c62129b67439ffac7 | |
parent | ASoC: qcom: use asoc_dummy_dlc (diff) | |
download | linux-ccfc8750dbe18755532ee3d7c94d918f9f5aee1f.tar.xz linux-ccfc8750dbe18755532ee3d7c94d918f9f5aee1f.zip |
ASoC: atmel: use asoc_dummy_dlc
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/871qka0zwb.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org
-rw-r--r-- | sound/soc/atmel/atmel-classd.c | 8 | ||||
-rw-r--r-- | sound/soc/atmel/atmel-pdmic.c | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 007ab746973d..4c1985711218 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -473,21 +473,19 @@ static int atmel_classd_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM; - comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM; - dai_link->cpus = &comp[0]; - dai_link->codecs = &comp[1]; + dai_link->cpus = comp; + dai_link->codecs = &asoc_dummy_dlc; dai_link->num_cpus = 1; dai_link->num_codecs = 1; dai_link->name = "CLASSD"; dai_link->stream_name = "CLASSD PCM"; - dai_link->codecs->dai_name = "snd-soc-dummy-dai"; dai_link->cpus->dai_name = dev_name(dev); - dai_link->codecs->name = "snd-soc-dummy"; card->dai_link = dai_link; card->num_links = 1; diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index 00c7b3a34ef5..efcbdd1a629f 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -496,21 +496,19 @@ static int atmel_pdmic_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM; - comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM; - dai_link->cpus = &comp[0]; - dai_link->codecs = &comp[1]; + dai_link->cpus = comp; + dai_link->codecs = &asoc_dummy_dlc; dai_link->num_cpus = 1; dai_link->num_codecs = 1; dai_link->name = "PDMIC"; dai_link->stream_name = "PDMIC PCM"; - dai_link->codecs->dai_name = "snd-soc-dummy-dai"; dai_link->cpus->dai_name = dev_name(dev); - dai_link->codecs->name = "snd-soc-dummy"; card->dai_link = dai_link; card->num_links = 1; |