diff options
author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2023-07-12 16:57:49 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-07-13 10:30:06 +0200 |
commit | 67192cc0f0263847ab3ccdcfe90989624a0c7fe3 (patch) | |
tree | 7ef0f6171d6e36319149861d53c92941f2f36ba6 /sound/pci/emu10k1/emu10k1_synth.c | |
parent | ALSA: emu10k1: fix return value of snd_emu1010_adc_pads_put() (diff) | |
download | linux-67192cc0f0263847ab3ccdcfe90989624a0c7fe3.tar.xz linux-67192cc0f0263847ab3ccdcfe90989624a0c7fe3.zip |
ALSA: emu10k1: remove superfluous IRQ enable state saving
The mixer, PCM prepare, MIDI, synth driver, and procfs callbacks are all
always invoked with IRQs enabled, so there is no point in saving the
state.
snd_emu1010_load_firmware_entry() is called from emu1010_firmware_work()
and snd_emu10k1_emu1010_init(); the latter from snd_emu10k1_create() and
snd_emu10k1_resume(), all of which have IRQs enabled.
The voice and memory functions are called from mixed contexts, so they
keep the state saving.
The low-level functions all keep the state saving, because it's not
feasible to keep track of what is called where.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230712145750.125086-2-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_synth.c')
-rw-r--r-- | sound/pci/emu10k1/emu10k1_synth.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/emu10k1_synth.c b/sound/pci/emu10k1/emu10k1_synth.c index 759e66e1105a..68dfcb24b889 100644 --- a/sound/pci/emu10k1/emu10k1_synth.c +++ b/sound/pci/emu10k1/emu10k1_synth.c @@ -22,7 +22,6 @@ static int snd_emu10k1_synth_probe(struct device *_dev) struct snd_emux *emux; struct snd_emu10k1 *hw; struct snd_emu10k1_synth_arg *arg; - unsigned long flags; arg = SNDRV_SEQ_DEVICE_ARGPTR(dev); if (arg == NULL) @@ -56,10 +55,10 @@ static int snd_emu10k1_synth_probe(struct device *_dev) return -ENOMEM; } - spin_lock_irqsave(&hw->voice_lock, flags); + spin_lock_irq(&hw->voice_lock); hw->synth = emux; hw->get_synth_voice = snd_emu10k1_synth_get_voice; - spin_unlock_irqrestore(&hw->voice_lock, flags); + spin_unlock_irq(&hw->voice_lock); dev->driver_data = emux; @@ -71,7 +70,6 @@ static int snd_emu10k1_synth_remove(struct device *_dev) struct snd_seq_device *dev = to_seq_dev(_dev); struct snd_emux *emux; struct snd_emu10k1 *hw; - unsigned long flags; if (dev->driver_data == NULL) return 0; /* not registered actually */ @@ -79,10 +77,10 @@ static int snd_emu10k1_synth_remove(struct device *_dev) emux = dev->driver_data; hw = emux->hw; - spin_lock_irqsave(&hw->voice_lock, flags); + spin_lock_irq(&hw->voice_lock); hw->synth = NULL; hw->get_synth_voice = NULL; - spin_unlock_irqrestore(&hw->voice_lock, flags); + spin_unlock_irq(&hw->voice_lock); snd_emux_free(emux); return 0; |