diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-26 14:44:38 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-26 14:44:38 -0300 |
commit | ae47015663cf986f5d338ede4c50f1513d7ae2e7 (patch) | |
tree | 3bd8ed3fa8a074bf64762996ae19910e9de9a26e | |
parent | 02a21b23c5b7676b326374708201900bc6d6ca0a (diff) | |
download | mediapointer-dvb-s2-ae47015663cf986f5d338ede4c50f1513d7ae2e7.tar.gz mediapointer-dvb-s2-ae47015663cf986f5d338ede4c50f1513d7ae2e7.tar.bz2 |
backport changeset f000fd80937c0d94c67f9f3e7026f1fbc8ef8873
From: Mauro Carvalho Chehab <mchehab@infradead.org>
kernel-sync:
Author: Jeff Garzik <jgarzik@redhat.com>
[ALSA] Fix synchronize_irq() bugs, redundancies
free_irq() calls synchronize_irq() for you, so there is no need for
drivers to manually do the same thing (again). Thus, calls where
sync-irq immediately precedes free-irq can be simplified.
However, during this audit several bugs were noticed, where free-irq is
preceded by a "irq >= 0" check... but the sync-irq call is not covered
by the same check.
So, where sync-irq could not be eliminated completely, the missing check
was added.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-alsa.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 5bf2fd5bc..9e87bcb98 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -755,10 +755,8 @@ MODULE_DEVICE_TABLE(pci, cx88_audio_pci_tbl); static int snd_cx88_free(snd_cx88_card_t *chip) { - if (chip->irq >= 0){ - synchronize_irq(chip->irq); + if (chip->irq >= 0) free_irq(chip->irq, chip); - } cx88_core_put(chip->core,chip->pci); diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 121b50e88..58670f9ea 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -969,10 +969,8 @@ static void snd_saa7134_free(struct snd_card * card) if (chip->dev->dmasound.priv_data == NULL) return; - if (chip->irq >= 0) { - synchronize_irq(chip->irq); + if (chip->irq >= 0) free_irq(chip->irq, &chip->dev->dmasound); - } chip->dev->dmasound.priv_data = NULL; |