From patchwork Sat Nov 21 11:01:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 7674101 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 43E2F9F2EC for ; Sat, 21 Nov 2015 11:05:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6682E2056C for ; Sat, 21 Nov 2015 11:05:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7EDF32055D for ; Sat, 21 Nov 2015 11:05:25 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1928C261AE0; Sat, 21 Nov 2015 12:05:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 61858260710; Sat, 21 Nov 2015 12:05:11 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D4C2526085B; Sat, 21 Nov 2015 12:05:09 +0100 (CET) Received: from smtp-out-188.synserver.de (smtp-out-098.synserver.de [212.40.185.98]) by alsa0.perex.cz (Postfix) with ESMTP id 5B7D02606F6 for ; Sat, 21 Nov 2015 12:05:02 +0100 (CET) Received: (qmail 28105 invoked by uid 0); 21 Nov 2015 11:01:30 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 27720 Received: from ppp-188-174-124-62.dynamic.mnet-online.de (HELO lars-laptop.fritz.box) [188.174.124.62] by 217.119.54.96 with SMTP; 21 Nov 2015 11:01:28 -0000 From: Lars-Peter Clausen To: Takashi Iwai , Jaroslav Kysela Date: Sat, 21 Nov 2015 12:01:22 +0100 Message-Id: <1448103682-17172-1-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 2.1.4 Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen Subject: [alsa-devel] [PATCH] ALSA: azt3328: Remove unnecessary synchronize_irq() before free_irq() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Lars-Peter Clausen --- sound/pci/azt3328.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 07a4acc..5e2ef0b 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c @@ -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);