summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRitu Chaudhary <rituc@nvidia.com>2025-03-11 06:20:10 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:44:00 +0200
commit1f576a3fd06d0e016c1caa692a8cb0cfdb2d9218 (patch)
tree9604c3116c41a472f7d68aaab611091f655d8155 /sound
parent9dfdd01dac5036ced73ebd51dabbeb839b05d2ad (diff)
downloadlinux-1f576a3fd06d0e016c1caa692a8cb0cfdb2d9218.tar.gz
linux-1f576a3fd06d0e016c1caa692a8cb0cfdb2d9218.tar.bz2
linux-1f576a3fd06d0e016c1caa692a8cb0cfdb2d9218.zip
ASoC: tegra: Use non-atomic timeout for ADX status register
[ Upstream commit f1d742c35b659fb0122da0a8ff09ad9309cb29d8 ] ADX startup() callback uses atomic poll timeout on ADX status register. This is unnecessary because: - The startup() callback itself is non-atomic. - The subsequent timeout call in the same function already uses a non-atomic version. Using atomic version can hog CPU when it is not really needed, so replace it with non-atomic version. Fixes: a99ab6f395a9e ("ASoC: tegra: Add Tegra210 based ADX driver") Signed-off-by: Ritu Chaudhary <rituc@nvidia.com> Signed-off-by: Sheetal <sheetal@nvidia.com> Link: https://patch.msgid.link/20250311062010.33412-1-sheetal@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra210_adx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 0aa93b948378..3c10e09976ad 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
-// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
+// SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES.
// All rights reserved.
//
// tegra210_adx.c - Tegra210 ADX driver
@@ -57,8 +57,8 @@ static int tegra210_adx_startup(struct snd_pcm_substream *substream,
int err;
/* Ensure if ADX status is disabled */
- err = regmap_read_poll_timeout_atomic(adx->regmap, TEGRA210_ADX_STATUS,
- val, !(val & 0x1), 10, 10000);
+ err = regmap_read_poll_timeout(adx->regmap, TEGRA210_ADX_STATUS,
+ val, !(val & 0x1), 10, 10000);
if (err < 0) {
dev_err(dai->dev, "failed to stop ADX, err = %d\n", err);
return err;