summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2024-08-01 16:48:11 +0530
committerMark Brown <broonie@kernel.org>2024-08-01 12:44:14 +0100
commit5bd414c7b80e39ef11bd86db76e726962c1bfc92 (patch)
treeadf516f6a6ed3e09a841e1b5f17d81cdedeabb97 /sound/soc/intel/boards
parent778dcb08832a5e526e447971f7ca72cb6dd2307b (diff)
ASoC: sdw_utils: refactor sof_sdw_card_late_probe function
Refactor sof_sdw_card_late_probe() function and derive a generic function soc_sdw_card_late_probe() function which can be used by SoundWire generic machine driver. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240801111821.18076-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards')
-rw-r--r--sound/soc/intel/boards/sof_sdw.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 07b1d6994304..65b15f594aed 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -1221,16 +1221,10 @@ static int sof_sdw_card_late_probe(struct snd_soc_card *card)
struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card);
struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private;
int ret = 0;
- int i;
-
- for (i = 0; i < ctx->codec_info_list_count; i++) {
- if (codec_info_list[i].codec_card_late_probe) {
- ret = codec_info_list[i].codec_card_late_probe(card);
- if (ret < 0)
- return ret;
- }
- }
+ ret = asoc_sdw_card_late_probe(card);
+ if (ret < 0)
+ return ret;
if (intel_ctx->hdmi.idisp_codec)
ret = sof_sdw_hdmi_card_late_probe(card);