Commit 06b830bd authored by Yong Zhi's avatar Yong Zhi Committed by Mark Brown

ASoC: Intel: sof_sdw: remove late_probe flag in struct sof_sdw_codec_info

Just use codec_card_late_probe ptr in struct sof_sdw_codec_info
for validation check and drop late_probe variable.
Signed-off-by: default avatarYong Zhi <yong.zhi@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230419195524.46995-4-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f5460a15
...@@ -621,7 +621,6 @@ static struct sof_sdw_codec_info codec_info_list[] = { ...@@ -621,7 +621,6 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.direction = {true, true}, .direction = {true, true},
.dai_name = "max98373-aif1", .dai_name = "max98373-aif1",
.init = sof_sdw_mx8373_init, .init = sof_sdw_mx8373_init,
.codec_card_late_probe = sof_sdw_mx8373_late_probe,
.codec_type = SOF_SDW_CODEC_TYPE_AMP, .codec_type = SOF_SDW_CODEC_TYPE_AMP,
}, },
{ {
...@@ -1490,12 +1489,12 @@ static int sof_sdw_card_late_probe(struct snd_soc_card *card) ...@@ -1490,12 +1489,12 @@ static int sof_sdw_card_late_probe(struct snd_soc_card *card)
int i; int i;
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) { for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) {
if (!codec_info_list[i].late_probe) if (codec_info_list[i].codec_card_late_probe) {
continue; ret = codec_info_list[i].codec_card_late_probe(card);
ret = codec_info_list[i].codec_card_late_probe(card); if (ret < 0)
if (ret < 0) return ret;
return ret; }
} }
if (ctx->idisp_codec) if (ctx->idisp_codec)
......
...@@ -74,7 +74,6 @@ struct sof_sdw_codec_info { ...@@ -74,7 +74,6 @@ struct sof_sdw_codec_info {
bool playback); bool playback);
int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
bool late_probe;
int (*codec_card_late_probe)(struct snd_soc_card *card); int (*codec_card_late_probe)(struct snd_soc_card *card);
}; };
......
...@@ -130,7 +130,7 @@ int sof_sdw_mx8373_init(struct snd_soc_card *card, ...@@ -130,7 +130,7 @@ int sof_sdw_mx8373_init(struct snd_soc_card *card,
if (info->amp_num == 2) if (info->amp_num == 2)
dai_links->init = spk_init; dai_links->init = spk_init;
info->late_probe = true; info->codec_card_late_probe = sof_sdw_mx8373_late_probe;
dai_links->ops = &max_98373_sdw_ops; dai_links->ops = &max_98373_sdw_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment