From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176AbYBVRtn (ORCPT ); Fri, 22 Feb 2008 12:49:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762779AbYBVRrr (ORCPT ); Fri, 22 Feb 2008 12:47:47 -0500 Received: from ns2.suse.de ([195.135.220.15]:49431 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757884AbYBVRrp (ORCPT ); Fri, 22 Feb 2008 12:47:45 -0500 Date: Fri, 22 Feb 2008 18:47:44 +0100 Message-ID: From: Takashi Iwai To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: [PATCH 16/16] [ALSA] bt87X: fix freeing of shared interrupt In-Reply-To: References: User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call free_irq() after iounmap() because other devices could trigger our shared interrupt handler. From: Clemens Ladisch Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai --- 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