summaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1_main.c
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-07-12 16:57:49 +0200
committerTakashi Iwai <tiwai@suse.de>2023-07-13 10:30:06 +0200
commit67192cc0f0263847ab3ccdcfe90989624a0c7fe3 (patch)
tree7ef0f6171d6e36319149861d53c92941f2f36ba6 /sound/pci/emu10k1/emu10k1_main.c
parentALSA: emu10k1: fix return value of snd_emu1010_adc_pads_put() (diff)
downloadlinux-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_main.c')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 661164dbf547..a11fcba4b9af 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -667,7 +667,6 @@ static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
u16 reg;
u8 value;
__always_unused u16 write_post;
- unsigned long flags;
if (!fw_entry)
return -EIO;
@@ -679,7 +678,7 @@ static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
* GPIO5 -> FPGA DIN
* FPGA CONFIG OFF -> FPGA PGMN
*/
- spin_lock_irqsave(&emu->emu_lock, flags);
+ spin_lock_irq(&emu->emu_lock);
outw(0x00, emu->port + A_GPIO); /* Set PGMN low for 100uS. */
write_post = inw(emu->port + A_GPIO);
udelay(100);
@@ -702,7 +701,7 @@ static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu,
/* After programming, set GPIO bit 4 high again. */
outw(0x10, emu->port + A_GPIO);
write_post = inw(emu->port + A_GPIO);
- spin_unlock_irqrestore(&emu->emu_lock, flags);
+ spin_unlock_irq(&emu->emu_lock);
return 0;
}