projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7178114
)
ALSA: emu10k1: use the right lock in snd_emu10k1_shared_spdif_put()
author
Oswald Buddenhagen
<oswald.buddenhagen@gmx.de>
Fri, 28 Apr 2023 09:59:38 +0000
(11:59 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 8 May 2023 07:21:54 +0000
(09:21 +0200)
The function does read-modify-write cycles on the card's registers, and
doesn't access mutable members of the emu data structure.
I suppose this might have been a mixup due to the lock names being
logically swapped.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link:
https://lore.kernel.org/r/20230428095941.1706278-4-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/emu10k1/emumixer.c
patch
|
blob
|
history
diff --git
a/sound/pci/emu10k1/emumixer.c
b/sound/pci/emu10k1/emumixer.c
index 3ebc7c36a44402bc5529f55129c591f43079e97c..24052f17d81c0205eae174fa3ed9eeae6fbc7ada 100644
(file)
--- a/
sound/pci/emu10k1/emumixer.c
+++ b/
sound/pci/emu10k1/emumixer.c
@@
-1654,7
+1654,7
@@
static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol,
sw = ucontrol->value.integer.value[0];
if (emu->card_capabilities->invert_shared_spdif)
sw = !sw;
- spin_lock_irqsave(&emu->
reg
_lock, flags);
+ spin_lock_irqsave(&emu->
emu
_lock, flags);
if ( emu->card_capabilities->i2c_adc) {
/* Do nothing for Audigy 2 ZS Notebook */
} else if (emu->audigy) {
@@
-1675,7
+1675,7
@@
static int snd_emu10k1_shared_spdif_put(struct snd_kcontrol *kcontrol,
reg |= val;
outl(reg | val, emu->port + HCFG);
}
- spin_unlock_irqrestore(&emu->
reg
_lock, flags);
+ spin_unlock_irqrestore(&emu->
emu
_lock, flags);
return change;
}