diff options
author | 2023-07-31 16:42:50 -0500 | |
---|---|---|
committer | 2023-07-31 23:22:36 +0100 | |
commit | febac07b4c69242d7870944457c3a1158ab97bdc (patch) | |
tree | a0b2ab1c75d270eacf852c44a12885d4552419cb /sound/soc/intel | |
parent | ASoC: intel: sof_sdw: Minor tidy up of mc_probe (diff) | |
download | linux-febac07b4c69242d7870944457c3a1158ab97bdc.tar.gz linux-febac07b4c69242d7870944457c3a1158ab97bdc.tar.bz2 linux-febac07b4c69242d7870944457c3a1158ab97bdc.zip |
ASoC: intel: sof_sdw: Remove redundant parameters in dai creation
Pull the device and mach struct out of the card rather than explicitly
passing to sof_card_dai_links_create.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/boards/sof_sdw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index d4f2711b6f26..dc5337ea75da 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1348,8 +1348,7 @@ static void set_dailink_map(struct snd_soc_dai_link_codec_ch_map *sdw_codec_ch_m static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"}; -static int create_sdw_dailink(struct snd_soc_card *card, - struct device *dev, int *link_index, +static int create_sdw_dailink(struct snd_soc_card *card, int *link_index, struct snd_soc_dai_link *dai_links, int sdw_be_num, int sdw_cpu_dai_num, struct snd_soc_dai_link_component *cpus, @@ -1363,6 +1362,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, int adr_index, int dai_index) { + struct device *dev = card->dev; const struct snd_soc_acpi_link_adr *adr_link_next; struct snd_soc_dai_link_component *codecs; struct sof_sdw_codec_info *codec_info; @@ -1563,10 +1563,10 @@ static int sof_card_codec_conf_alloc(struct device *dev, return 0; } -static int sof_card_dai_links_create(struct device *dev, - struct snd_soc_acpi_mach *mach, - struct snd_soc_card *card) +static int sof_card_dai_links_create(struct snd_soc_card *card) { + struct device *dev = card->dev; + struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev); int ssp_num, sdw_be_num = 0, hdmi_num = 0, dmic_num; struct mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_dai_link_component *idisp_components; @@ -1723,7 +1723,7 @@ out: return codec_index; for (j = 0; j < codec_info_list[codec_index].dai_num ; j++) { - ret = create_sdw_dailink(card, dev, &link_index, dai_links, + ret = create_sdw_dailink(card, &link_index, dai_links, sdw_be_num, sdw_cpu_dai_num, cpus, adr_link, &cpu_id, group_generated, codec_conf, codec_conf_count, @@ -1991,7 +1991,7 @@ static int mc_probe(struct platform_device *pdev) log_quirks(card->dev); - ret = sof_card_dai_links_create(card->dev, mach, card); + ret = sof_card_dai_links_create(card); if (ret < 0) return ret; |