diff options
author | Takashi Iwai <[email protected]> | 2020-11-23 09:53:34 +0100 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2020-11-23 15:15:48 +0100 |
commit | 43b81e84068d26d630b63fa877e682909a0102fe (patch) | |
tree | ce23f626a7cdc49a67a539c6e2080e10279bce0b /lib/mpi/mpi-mod.c | |
parent | cab941b7e5cf054502b01f776db724400ee5c1b6 (diff) |
ALSA: usb-audio: Use atomic_t for endpoint use_count
The endpoint objects may be started/stopped concurrently by different
substreams in the case of implicit feedback mode, while the current
code handles the reference counter without any protection.
This patch changes the refcount to atomic_t for avoiding the
inconsistency. We need no reference_t here as the refcount goes only
up to 2.
Also the name "use_count" is renamed to "running" since this is about
actually the running status, not the open refcount.
Tested-by: Keith Milner <[email protected]>
Tested-by: Dylan Robinson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions