Skip to content

Commit e9fcbaf

Browse files
yongzhi1broonie
authored andcommitted
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 <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230419195524.46995-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 06b830b commit e9fcbaf

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

sound/soc/intel/boards/sof_sdw_common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ int sof_sdw_mx8373_init(struct snd_soc_card *card,
158158
struct sof_sdw_codec_info *info,
159159
bool playback);
160160

161-
int sof_sdw_mx8373_late_probe(struct snd_soc_card *card);
162-
163161
/* RT5682 support */
164162
int sof_sdw_rt5682_init(struct snd_soc_card *card,
165163
const struct snd_soc_acpi_link_adr *link,

sound/soc/intel/boards/sof_sdw_max98373.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ static const struct snd_soc_ops max_98373_sdw_ops = {
120120
.shutdown = sdw_shutdown,
121121
};
122122

123+
static int mx8373_sdw_late_probe(struct snd_soc_card *card)
124+
{
125+
struct snd_soc_dapm_context *dapm = &card->dapm;
126+
127+
/* Disable Left and Right Spk pin after boot */
128+
snd_soc_dapm_disable_pin(dapm, "Left Spk");
129+
snd_soc_dapm_disable_pin(dapm, "Right Spk");
130+
return snd_soc_dapm_sync(dapm);
131+
}
132+
123133
int sof_sdw_mx8373_init(struct snd_soc_card *card,
124134
const struct snd_soc_acpi_link_adr *link,
125135
struct snd_soc_dai_link *dai_links,
@@ -130,19 +140,9 @@ int sof_sdw_mx8373_init(struct snd_soc_card *card,
130140
if (info->amp_num == 2)
131141
dai_links->init = spk_init;
132142

133-
info->codec_card_late_probe = sof_sdw_mx8373_late_probe;
143+
info->codec_card_late_probe = mx8373_sdw_late_probe;
134144

135145
dai_links->ops = &max_98373_sdw_ops;
136146

137147
return 0;
138148
}
139-
140-
int sof_sdw_mx8373_late_probe(struct snd_soc_card *card)
141-
{
142-
struct snd_soc_dapm_context *dapm = &card->dapm;
143-
144-
/* Disable Left and Right Spk pin after boot */
145-
snd_soc_dapm_disable_pin(dapm, "Left Spk");
146-
snd_soc_dapm_disable_pin(dapm, "Right Spk");
147-
return snd_soc_dapm_sync(dapm);
148-
}

0 commit comments

Comments
 (0)