From e9fcbaff5fb871f1a10f09d7d1a4cd13c923e280 Mon Sep 17 00:00:00 2001 From: Yong Zhi Date: Wed, 19 Apr 2023 14:55:21 -0500 Subject: [PATCH] ASoC: Intel: sof_sdw_max98373: change sof_sdw_mx8373_late_probe to static call sof_sdw_mx8373_late_probe is only used in sof_sdw_max98373, so it should be static and rename it to 'mx8373_sdw_late_probe'. Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20230419195524.46995-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/intel/boards/sof_sdw_common.h | 2 -- sound/soc/intel/boards/sof_sdw_max98373.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 4962dc1..081ab7e 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -158,8 +158,6 @@ int sof_sdw_mx8373_init(struct snd_soc_card *card, struct sof_sdw_codec_info *info, bool playback); -int sof_sdw_mx8373_late_probe(struct snd_soc_card *card); - /* RT5682 support */ int sof_sdw_rt5682_init(struct snd_soc_card *card, const struct snd_soc_acpi_link_adr *link, diff --git a/sound/soc/intel/boards/sof_sdw_max98373.c b/sound/soc/intel/boards/sof_sdw_max98373.c index 22bd1e3..3d7df58 100644 --- a/sound/soc/intel/boards/sof_sdw_max98373.c +++ b/sound/soc/intel/boards/sof_sdw_max98373.c @@ -120,6 +120,16 @@ static const struct snd_soc_ops max_98373_sdw_ops = { .shutdown = sdw_shutdown, }; +static int mx8373_sdw_late_probe(struct snd_soc_card *card) +{ + struct snd_soc_dapm_context *dapm = &card->dapm; + + /* Disable Left and Right Spk pin after boot */ + snd_soc_dapm_disable_pin(dapm, "Left Spk"); + snd_soc_dapm_disable_pin(dapm, "Right Spk"); + return snd_soc_dapm_sync(dapm); +} + int sof_sdw_mx8373_init(struct snd_soc_card *card, const struct snd_soc_acpi_link_adr *link, struct snd_soc_dai_link *dai_links, @@ -130,19 +140,9 @@ int sof_sdw_mx8373_init(struct snd_soc_card *card, if (info->amp_num == 2) dai_links->init = spk_init; - info->codec_card_late_probe = sof_sdw_mx8373_late_probe; + info->codec_card_late_probe = mx8373_sdw_late_probe; dai_links->ops = &max_98373_sdw_ops; return 0; } - -int sof_sdw_mx8373_late_probe(struct snd_soc_card *card) -{ - struct snd_soc_dapm_context *dapm = &card->dapm; - - /* Disable Left and Right Spk pin after boot */ - snd_soc_dapm_disable_pin(dapm, "Left Spk"); - snd_soc_dapm_disable_pin(dapm, "Right Spk"); - return snd_soc_dapm_sync(dapm); -} -- 2.7.4