Unverified Commit 69927c13 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: mediatek: mt8189-nau8825: don't use card->dapm directly



We should get dapm via snd_soc_card_to_dapm(card), and use it.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87bjkgnnhg.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d00e8060
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -342,9 +342,10 @@ static const struct snd_soc_ops mt8189_es8326_ops = {
static int mt8189_dumb_amp_init(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_soc_card *card = rtd->card;
	struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
	int ret;

	ret = snd_soc_dapm_new_controls(&card->dapm, mt8189_dumb_spk_widgets,
	ret = snd_soc_dapm_new_controls(dapm, mt8189_dumb_spk_widgets,
					ARRAY_SIZE(mt8189_dumb_spk_widgets));
	if (ret) {
		dev_err(rtd->dev, "unable to add Dumb Speaker dapm, ret %d\n", ret);
@@ -418,10 +419,11 @@ static int mt8189_headset_codec_init(struct snd_soc_pcm_runtime *rtd)
	struct snd_soc_jack *jack = &soc_card_data->card_data->jacks[MT8189_JACK_HEADSET];
	struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
	struct mtk_platform_card_data *card_data = soc_card_data->card_data;
	struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
	int ret;
	int type;

	ret = snd_soc_dapm_new_controls(&card->dapm, mt8189_headset_widgets,
	ret = snd_soc_dapm_new_controls(dapm, mt8189_headset_widgets,
					ARRAY_SIZE(mt8189_headset_widgets));
	if (ret) {
		dev_err(rtd->dev, "unable to add nau8825 card widget, ret %d\n", ret);