linux-stable/sound
Takashi Iwai f4fa968950 ALSA: core: Don't refer to snd_cards array directly
The snd_cards[] array holds the card pointers that have been currently
registered, and it's exported for the external modules that may need
to refer a card object.  But accessing to this array can be racy
against the driver probe or removal, as the card registration or free
may happen concurrently.

This patch gets rid of the direct access to snd_cards[] array and
provides a helper function to give the card object from the index
number with a refcount management.  Then the caller can access to the
given card object safely, and releases it via snd_card_unref().

While we're at it, add a proper comment to snd_card_unref() and make
it an inlined function for type-safety, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-04-17 07:16:15 +02:00
..
ac97 ALSA: ac97: Fix of-node refcount unbalance 2019-02-19 22:20:14 +01:00
aoa ALSA: aoa: Fix of-node refcount unbalance 2019-02-19 22:20:45 +01:00
arm ALSA: arm: Avoid passing NULL to memory allocators 2019-02-04 16:51:46 +01:00
atmel ALSA: atmel: Drop superfluous PCM preallocation error checks 2019-02-06 10:28:39 +01:00
core ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
drivers ALSA: aloop: Support S24 sample formats 2019-03-25 16:39:18 +01:00
firewire ALSA: firewire-lib: use 8 byte header for IR context to get isochronous cycle 2019-03-18 14:50:35 +01:00
hda ALSA: hda: Initialize ext-bus-specific fields in snd_hdac_bus_init(), too 2019-04-13 10:10:26 +02:00
i2c ALSA: i2c: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
isa ALSA: sb8: add a check for request_region 2019-03-16 10:30:27 +01:00
mips ALSA: mips: pass struct device to DMA API functions 2019-02-01 17:15:44 +01:00
oss
parisc ALSA: parisc: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:03 +01:00
pci ALSA: emu10k1: Drop superfluous id-uniquification behavior 2019-04-17 07:16:12 +02:00
pcmcia ALSA: pcmcia: Clean up with new procfs helpers 2019-02-06 18:11:57 +01:00
ppc ALSA: ppc: Fix of-node refcount unbalance 2019-02-19 22:20:46 +01:00
sh ALSA: sh: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:24 +01:00
soc ASoC: wcd9335: Fix missing regmap requirement 2019-04-10 17:07:59 +01:00
sparc ASoC: Updates for v5.1 2019-02-08 14:20:32 +01:00
spi ALSA: spi: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:36 +01:00
synth ALSA: emux: Add support of loading GUS-patch 2019-03-26 17:32:02 +01:00
usb ALSA: usb-audio: Add quirk for Focusrite Scarlett Solo 2019-04-15 11:37:27 +02:00
x86 ALSA: x86: Avoid passing NULL to memory allocators 2019-02-04 16:51:34 +01:00
xen ALSA: xen-front: Do not use stream buffer size before it is set 2019-04-04 14:44:18 +02:00
ac97_bus.c
Kconfig
last.c ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
Makefile
sound_core.c