Skip to contentSkip to conversation

ALSA: azt3328: Remove unnecessary synchronize_irq() before free_irq()

PATCH Applied Lars-Peter Clausen 2 participants 2 messages Nov 21, 2015 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: azt3328: Remove unnecessary synchronize_irq() before free_irq()

Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way) before any state associated with the IRQ is freed.

---
 sound/pci/azt3328.c | 2 --
 1 file changed, 2 deletions(-)
sound/pci/azt3328.c +0 -2
index 07a4acc..5e2ef0b 100644
@@ -2294,8 +2294,6 @@ snd_azf3328_free(struct snd_azf3328 *chip)
 	snd_azf3328_timer_stop(chip->timer);
 	snd_azf3328_gameport_free(chip);
 
-	if (chip->irq >= 0)
-		synchronize_irq(chip->irq);
 __end_hw:
 	if (chip->irq >= 0)
 		free_irq(chip->irq, chip);
Signature · 1 line
2.1.4
Applied
#1 lore raw
Quoted 7 lines · Lars-Peter Clausen

Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way) before any state associated with the IRQ is freed.

Applied, thanks.

Takashi

Quoted 21 lines
---
 sound/pci/azt3328.c | 2 --
 1 file changed, 2 deletions(-)
sound/pci/azt3328.c +0 -2
index 07a4acc..5e2ef0b 100644
@@ -2294,8 +2294,6 @@ snd_azf3328_free(struct snd_azf3328 *chip)
 	snd_azf3328_timer_stop(chip->timer);
 	snd_azf3328_gameport_free(chip);
 
-	if (chip->irq >= 0)
-		synchronize_irq(chip->irq);
 __end_hw:
 	if (chip->irq >= 0)
 		free_irq(chip->irq, chip);
Signature · 1 line
2.1.4