[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240324230116.1348576-501-sashal@kernel.org>
Date: Sun, 24 Mar 2024 18:58:57 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Gergo Koteles <soyer@....hu>,
Takashi Iwai <tiwai@...e.de>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 6.6 500/638] ALSA: hda/tas2781: add lock to system_suspend
From: Gergo Koteles <soyer@....hu>
[ Upstream commit c58e6ed55a1bb9811d6d936d001b068bb0419467 ]
Add the missing lock around tasdevice_tuning_switch().
Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Signed-off-by: Gergo Koteles <soyer@....hu>
Signed-off-by: Takashi Iwai <tiwai@...e.de>
Message-ID: <c666da13d4bc48cd1ab1357479e0c6096541372c.1709918447.git.soyer@....hu>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
sound/pci/hda/tas2781_hda_i2c.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 1abe04e2685d9..afaa7ee171a7b 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -796,9 +796,13 @@ static int tas2781_system_suspend(struct device *dev)
if (ret)
return ret;
+ mutex_lock(&tas_hda->priv->codec_lock);
+
/* Shutdown chip before system suspend */
tasdevice_tuning_switch(tas_hda->priv, 1);
+ mutex_unlock(&tas_hda->priv->codec_lock);
+
/*
* Reset GPIO may be shared, so cannot reset here.
* However beyond this point, amps may be powered down.
--
2.43.0
Powered by blists - more mailing lists