Skip to content

Commit f1d742c

Browse files
Ritu Chaudharybroonie
authored andcommitted
ASoC: tegra: Use non-atomic timeout for ADX status register
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: a99ab6f ("ASoC: tegra: Add Tegra210 based ADX driver") Signed-off-by: Ritu Chaudhary <[email protected]> Signed-off-by: Sheetal <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0ec6bd1 commit f1d742c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/soc/tegra/tegra210_adx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: GPL-2.0-only
2-
// SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
2+
// SPDX-FileCopyrightText: Copyright (c) 2021-2025 NVIDIA CORPORATION & AFFILIATES.
33
// All rights reserved.
44
//
55
// tegra210_adx.c - Tegra210 ADX driver
@@ -57,8 +57,8 @@ static int tegra210_adx_startup(struct snd_pcm_substream *substream,
5757
int err;
5858

5959
/* Ensure if ADX status is disabled */
60-
err = regmap_read_poll_timeout_atomic(adx->regmap, TEGRA210_ADX_STATUS,
61-
val, !(val & 0x1), 10, 10000);
60+
err = regmap_read_poll_timeout(adx->regmap, TEGRA210_ADX_STATUS,
61+
val, !(val & 0x1), 10, 10000);
6262
if (err < 0) {
6363
dev_err(dai->dev, "failed to stop ADX, err = %d\n", err);
6464
return err;

0 commit comments

Comments
 (0)