diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-09-26 16:55:48 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-09-27 09:44:05 +0300 |
commit | f0061c18c169f0c32d96b59485c3edee85e343ed (patch) | |
tree | 1ce7b4b5d34cb4f01d64287bbcf14436b365f30b /sound/sparc | |
parent | 69ab6f5b00b1804ea42b375ca30d818d169cae82 (diff) | |
download | linux-f0061c18c169f0c32d96b59485c3edee85e343ed.tar.xz |
ALSA: pcm: Avoid reference to status->state
In the PCM core and driver code, there are lots place referring to the
current PCM state via runtime->status->state. This patch introduced a
local PCM state in runtime itself and replaces those references with
runtime->state. It has improvements in two aspects:
- The reduction of a indirect access leads to more code optimization
- It avoids a possible (unexpected) modification of the state via mmap
of the status record
The status->state is updated together with runtime->state, so that
user-space can still read the current state via mmap like before,
too.
This patch touches only the ALSA core code. The changes in each
driver will follow in later patches.
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220926135558.26580-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc')
0 files changed, 0 insertions, 0 deletions