From patchwork Fri May 8 19:57:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Lilja X-Patchwork-Id: 27020 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id D02DDB6F35 for ; Sat, 9 May 2009 06:01:10 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1M2WCm-0003nn-Hq; Fri, 08 May 2009 19:58:00 +0000 Received: from mail.lysator.liu.se ([130.236.254.3]) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1M2WCe-0003hW-0A for linux-mtd@lists.infradead.org; Fri, 08 May 2009 19:57:58 +0000 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 5253E400D5; Fri, 8 May 2009 21:57:22 +0200 (CEST) Received: from localhost.localdomain (36-115-117-82.cust.blixtvik.se [82.117.115.36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTP id 38D1340014; Fri, 8 May 2009 21:57:22 +0200 (CEST) From: Magnus Lilja To: linux-mtd@lists.infradead.org Subject: [PATCH] MXC_NAND: Add correct dev_id parameter to free_irq() calls. Date: Fri, 8 May 2009 21:57:47 +0200 Message-Id: <17fbadcd7f353348afa4c56f92e0423c5b9708df.1241812369.git.lilja.magnus@gmail.com> X-Mailer: git-send-email 1.5.6 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Score: 0.0 (/) Cc: s.hauer@pengutronix.de X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Make sure to pass the same dev_id data to free_irq() that was used when calling request_irq(), otherwise we get a warning about freeing an already free IRQ. Signed-off-by: Magnus Lilja --- For -rc perhaps? Got the following warning prior to fixing this: WARNING: at /opt/git/linux-2.6/kernel/irq/manage.c:736 __free_irq+0x88/ 0x1ac() Trying to free already-free IRQ 33 Modules linked in: mxc_nand(-) [] (unwind_backtrace+0x0/0xd4) from [] (warn_slowpath+0x68/0 x8c) [] (warn_slowpath+0x68/0x8c) from [] (__free_irq+0x88/0x1ac) [] (__free_irq+0x88/0x1ac) from [] (free_irq+0xc/0x18) [] (free_irq+0xc/0x18) from [] (mxcnd_remove+0x30/0x48 [mxc_ nand]) unwind: Index not found bf000c24 drivers/mtd/nand/mxc_nand.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index f3548d0..8a93913 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -981,7 +981,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) return 0; escan: - free_irq(host->irq, NULL); + free_irq(host->irq, host); eirq: iounmap(host->regs); eres: @@ -1001,7 +1001,7 @@ static int __devexit mxcnd_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); nand_release(&host->mtd); - free_irq(host->irq, NULL); + free_irq(host->irq, host); iounmap(host->regs); kfree(host);