From: Kuninori Morimoto Date: Mon, 8 Jun 2026 01:24:55 +0000 (+0000) Subject: ASoC: mediatek: mt8186-mt6366: tidyup mt8186_mt6366_card_set_be_link() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e611c2ccf75f7c4c96b95084d2544f0ae23fd753;p=thirdparty%2Flinux.git ASoC: mediatek: mt8186-mt6366: tidyup mt8186_mt6366_card_set_be_link() mt8186_mt6366_card_set_be_link() requests *card, but necessary is card->dev. Tidyup it. Signed-off-by: Kuninori Morimoto Link: https://patch.msgid.link/87cxy1esd4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-common.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-common.c index e325d216c0089..5a34d3f7fa589 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-common.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-common.c @@ -39,7 +39,7 @@ int mt8186_mt6366_init(struct snd_soc_pcm_runtime *rtd) } EXPORT_SYMBOL_GPL(mt8186_mt6366_init); -int mt8186_mt6366_card_set_be_link(struct snd_soc_card *card, +int mt8186_mt6366_card_set_be_link(struct device *dev, struct snd_soc_dai_link *link, struct device_node *node, char *link_name) @@ -47,9 +47,9 @@ int mt8186_mt6366_card_set_be_link(struct snd_soc_card *card, int ret; if (node && strcmp(link->name, link_name) == 0) { - ret = snd_soc_of_get_dai_link_codecs(card->dev, node, link); + ret = snd_soc_of_get_dai_link_codecs(dev, node, link); if (ret < 0) - return dev_err_probe(card->dev, ret, "get dai link codecs fail\n"); + return dev_err_probe(dev, ret, "get dai link codecs fail\n"); } return 0; diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-common.h b/sound/soc/mediatek/mt8186/mt8186-mt6366-common.h index 907d8f5e46b1b..2094e786c623e 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-common.h +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-common.h @@ -10,7 +10,7 @@ #define _MT8186_MT6366_COMMON_H_ int mt8186_mt6366_init(struct snd_soc_pcm_runtime *rtd); -int mt8186_mt6366_card_set_be_link(struct snd_soc_card *card, +int mt8186_mt6366_card_set_be_link(struct device *dev, struct snd_soc_dai_link *link, struct device_node *node, char *link_name); diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366.c b/sound/soc/mediatek/mt8186/mt8186-mt6366.c index 2c3033f305eaf..3fc93a8ad408e 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366.c @@ -1178,21 +1178,21 @@ static int mt8186_mt6366_legacy_probe(struct mtk_soc_card_data *soc_card_data) } for_each_card_prelinks(card, i, dai_link) { - ret = mt8186_mt6366_card_set_be_link(card, dai_link, playback_codec, "I2S3"); + ret = mt8186_mt6366_card_set_be_link(dev, dai_link, playback_codec, "I2S3"); if (ret) { dev_err_probe(dev, ret, "%s set playback_codec fail\n", dai_link->name); break; } - ret = mt8186_mt6366_card_set_be_link(card, dai_link, headset_codec, "I2S0"); + ret = mt8186_mt6366_card_set_be_link(dev, dai_link, headset_codec, "I2S0"); if (ret) { dev_err_probe(dev, ret, "%s set headset_codec fail\n", dai_link->name); break; } - ret = mt8186_mt6366_card_set_be_link(card, dai_link, headset_codec, "I2S1"); + ret = mt8186_mt6366_card_set_be_link(dev, dai_link, headset_codec, "I2S1"); if (ret) { dev_err_probe(dev, ret, "%s set headset_codec fail\n", dai_link->name);