lkml.org 
[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 16/16] [ALSA] bt87X: fix freeing of shared interrupt
Call free_irq() after iounmap() because other devices could trigger our
shared interrupt handler.

From: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/bt87x.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index c9a2421..4ecdd63 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -681,15 +681,12 @@ static struct snd_kcontrol_new snd_bt87x_capture_source = {

static int snd_bt87x_free(struct snd_bt87x *chip)
{
- if (chip->mmio) {
+ if (chip->mmio)
snd_bt87x_stop(chip);
- if (chip->irq >= 0)
- synchronize_irq(chip->irq);
-
- iounmap(chip->mmio);
- }
if (chip->irq >= 0)
free_irq(chip->irq, chip);
+ if (chip->mmio)
+ iounmap(chip->mmio);
pci_release_regions(chip->pci);
pci_disable_device(chip->pci);
kfree(chip);
--
1.5.3.8


\
 
 \ /
  Last update: 2008-02-22 18:53    [W:0.142 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site