Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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>

authored by

Ritu Chaudhary and committed by
Mark Brown
f1d742c3 0ec6bd16

+3 -3
+3 -3
sound/soc/tegra/tegra210_adx.c
··· 1 1 // 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. 3 3 // All rights reserved. 4 4 // 5 5 // tegra210_adx.c - Tegra210 ADX driver ··· 57 57 int err; 58 58 59 59 /* 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); 62 62 if (err < 0) { 63 63 dev_err(dai->dev, "failed to stop ADX, err = %d\n", err); 64 64 return err;