--- Begin Message ---
- To: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>
- Subject: Re: [PATCH 2/6] ASoC: atmel: remove unnecessary dai_link->platform
- From: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
- Date: Wed, 15 Mar 2023 10:39:01 +0100
- Cc: Linux-ALSA <alsa-devel@xxxxxxxxxxxxxxxx>, Codrin Ciubotariu <codrin.ciubotariu@xxxxxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
- In-reply-to: <875yb2jz2p.wl-kuninori.morimoto.gx@renesas.com>
- Organization: microchip
- References: <878rfyjz4p.wl-kuninori.morimoto.gx@renesas.com> <875yb2jz2p.wl-kuninori.morimoto.gx@renesas.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0
On 15/03/2023 at 07:41, Kuninori Morimoto wrote:
dai_link->platform is no longer needed if CPU and Platform are
same Component. This patch removes unnecessary dai_link->platform.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
It looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
Thanks Kuninori for having taken care of these drivers. Best regards,
Nicolas
---
sound/soc/atmel/atmel-classd.c | 5 +----
sound/soc/atmel/atmel-pdmic.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 9883e6867fd1..007ab746973d 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -473,24 +473,21 @@ static int atmel_classd_asoc_card_init(struct device *dev,
if (!dai_link)
return -ENOMEM;
- comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL);
+ comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL);
if (!comp)
return -ENOMEM;
dai_link->cpus = &comp[0];
dai_link->codecs = &comp[1];
- dai_link->platforms = &comp[2];
dai_link->num_cpus = 1;
dai_link->num_codecs = 1;
- dai_link->num_platforms = 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";
- dai_link->platforms->name = dev_name(dev);
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 12cd40b15644..00c7b3a34ef5 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -496,24 +496,21 @@ static int atmel_pdmic_asoc_card_init(struct device *dev,
if (!dai_link)
return -ENOMEM;
- comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL);
+ comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL);
if (!comp)
return -ENOMEM;
dai_link->cpus = &comp[0];
dai_link->codecs = &comp[1];
- dai_link->platforms = &comp[2];
dai_link->num_cpus = 1;
dai_link->num_codecs = 1;
- dai_link->num_platforms = 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";
- dai_link->platforms->name = dev_name(dev);
card->dai_link = dai_link;
card->num_links = 1;
--
2.25.1
--
Nicolas Ferre
--- End Message ---