summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorRicardo Cerqueira <devnull@localhost>2005-11-07 23:06:28 +0000
committerRicardo Cerqueira <devnull@localhost>2005-11-07 23:06:28 +0000
commitd711c94f17eceb5a8da0bf673852d9a22e849e0f (patch)
treea94d4c493ca04847cbec7f60384c0e3cf7ad9e5b /linux/drivers/media
parentbe3a0bcb5e7157b662e7123c64b28a50d9f53b56 (diff)
downloadmediapointer-dvb-s2-d711c94f17eceb5a8da0bf673852d9a22e849e0f.tar.gz
mediapointer-dvb-s2-d711c94f17eceb5a8da0bf673852d9a22e849e0f.tar.bz2
- Fix nasty IRQ hook bug.
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index a65ac4be1..4a968dcaa 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -1,7 +1,7 @@
/*
* SAA713x ALSA support for V4L
*
- * $Id: saa7134-alsa.c,v 1.14 2005/11/07 20:22:20 rmcc Exp $
+ * $Id: saa7134-alsa.c,v 1.15 2005/11/07 23:06:28 rmcc Exp $
*
* Caveats:
* - Volume doesn't work (it's always at max)
@@ -219,7 +219,8 @@ void saa7134_irq_alsa_done(struct saa7134_dev *dev, unsigned long status)
static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id, struct pt_regs *regs)
{
- struct saa7134_dev *dev = (struct saa7134_dev*) dev_id;
+ snd_card_saa7134_t *saa7134 = dev_id;
+ struct saa7134_dev *dev = saa7134->saadev;
unsigned long report, status;
int loop, handled = 0;
@@ -910,6 +911,11 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
static int snd_saa7134_free(snd_card_saa7134_t *chip)
{
+ if (chip->irq >= 0) {
+ synchronize_irq(chip->irq);
+ free_irq(chip->irq, (void *) chip);
+ }
+ kfree(chip);
return 0;
}
@@ -970,7 +976,7 @@ int alsa_card_saa7134_create (struct saa7134_dev *saadev)
chip->iobase = pci_resource_start(saadev->pci, 0);
err = request_irq(saadev->pci->irq, saa7134_alsa_irq,
- SA_SHIRQ | SA_INTERRUPT, saadev->name, saadev);
+ SA_SHIRQ | SA_INTERRUPT, saadev->name, (void *)chip);
if (err < 0) {
printk(KERN_ERR "%s: can't get IRQ %d for ALSA\n",