linux/sound
Sasha Levin 99cb77d9f9 Revert "ALSA: aoa: Use guard() for mutex locks"
This reverts commit d956208576.

Commit d956208576 ("ALSA: aoa: Use guard() for mutex locks", upstream
commit 1cb6ecbb37) was picked up for 5.15.y only as a Stable-dep-of
for 5ed060d549 ("ALSA: aoa: i2sbus: clear stale prepared state").

5.15.y still builds with '-std=gnu89' and '-Wdeclaration-after-statement',
so the guard() and scoped_guard() helpers cannot be used here at all: the
CLASS() declaration that guard() expands to is a declaration in the middle
of a block, and scoped_guard() declares its variable in a for() init
clause.  With CONFIG_WERROR=y (allmodconfig) this breaks the powerpc
build:

  sound/aoa/core/gpio-pmf.c: In function 'pmf_set_notify':
  ./include/linux/cleanup.h:86:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  sound/aoa/codecs/tas.c: In function 'tas_switch_clock':
  ./include/linux/cleanup.h:112:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode

Revert the cleanup so that sound/aoa goes back to explicit
mutex_lock()/mutex_unlock() pairs.  As it was a pure refactoring with no
behaviour change, nothing is lost.

The two fixes that were queued on top of it are kept and re-adapted to
the explicit locking in sound/aoa/soundbus/i2sbus/pcm.c:

 - 2c38191380 ("ALSA: aoa: i2sbus: clear stale prepared state"):
   i2sbus_pcm_clear_active() now takes and drops i2sdev->lock explicitly,
   and i2sbus_pcm_prepare() sets pi->active only on the success paths,
   which are now reached via 'goto out_unlock' with result == 0.
 - d17c282163 ("ALSA: aoa: Skip devices with no codecs in
   i2sbus_resume()"): the list_first_entry() conversion in
   i2sbus_pcm_prepare() is kept.

Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-08-27 14:28:23 +02:00
..
ac97 bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
aoa Revert "ALSA: aoa: Use guard() for mutex locks" 2026-08-27 14:28:23 +02:00
arm ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: seq: close a re-opened queue timer in the destructor 2026-08-23 14:17:26 +02:00
drivers ALSA: dummy: Check card index validity at probe 2026-08-27 14:28:18 +02:00
firewire ALSA: firewire: isight: bound the sample count to the packet payload 2026-07-24 15:51:19 +02:00
hda ALSA: hda: Fix cached processing coefficient verbs 2026-08-23 14:17:18 +02:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-04-20 12:13:51 +02:00
isa ALSA: sc6000: Keep the programmed board state in card-private data 2026-06-01 17:35:32 +02:00
mips ALSA: n64: check return value after calling platform_get_resource() 2021-06-12 09:31:13 +02:00
oss sound/oss/dmasound: fix 'dmasound_setup' defined but not used 2023-05-11 23:00:40 +09:00
parisc parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci ALSA: hda: conexant: Remove mic bias threshold override 2026-08-23 14:17:18 +02:00
pcmcia ALSA: pcmcia: Fix resource leak in snd_pdacf_probe error path 2026-01-19 13:09:46 +01:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-06-16 08:52:29 +02:00
sh ALSA: sh: SND_AICA should depend on SH_DMA_API 2025-05-22 14:08:22 +02:00
soc ASoC: codecs: lpass-tx-macro: Fix enum kcontrol accesses 2026-08-27 14:28:21 +02:00
sparc ALSA: sparc: Fix assignment in if condition 2021-06-09 17:30:29 +02:00
spi ALSA: spi: Add check for clk_enable() 2022-04-08 14:23:19 +02:00
synth ALSA: emux: improve patch ioctl data validation 2024-07-05 09:14:43 +02:00
usb ALSA: usx2y: bound the hwdep mmap fault offset 2026-08-19 17:14:16 +02:00
virtio ALSA: virtio: Add missing 384 kHz PCM rate mapping 2026-07-24 15:51:19 +02:00
x86 ALSA: intel_hdmi: Fix off-by-one error in __hdmi_lpe_audio_probe() 2025-08-28 16:24:14 +02:00
xen module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ac97_bus.c ALSA: ac97: Treat snd_ac97_bus_ops as const 2020-01-03 09:24:08 +01:00
Kconfig sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML 2024-11-17 15:06:25 +01:00
last.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Makefile ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00