From patchwork Fri Jun 17 11:06:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 100795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9538BB6FAC for ; Fri, 17 Jun 2011 21:07:10 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QXWsy-0004VY-4h; Fri, 17 Jun 2011 11:06:48 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QXWsx-0004hX-Nd; Fri, 17 Jun 2011 11:06:47 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QXWsv-0004hE-Jf for linux-mtd@lists.infradead.org; Fri, 17 Jun 2011 11:06:46 +0000 Received: by iyb39 with SMTP id 39so2397388iyb.36 for ; Fri, 17 Jun 2011 04:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=IWbE71sDicJ3KJtvJSMXDVnW21c/9ok/YUBvR1dLOkY=; b=ZfVcDGMYxL4GVJr4DUnv1UY9ecoYKs6+8cMv8KaXbdVTeYnTXOTk4l1yvDJ0qcTcGH 8MR2I9QPLFTy4LhbjQBtvdtvqm3DdlCWPF6Jx5J/rgOqoi7U9YlH9ajrWBWlsTBx93R3 453PL7mxu712mfIcTR4f0c6Uq+ZSXa1EvyKeM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=IQ5VaLpMquh9MNocg47jBvTHAWhwEglCujeLoVHF5E5bNf3dKMjuuuVNmhcKdrxiV8 cmB3cB/jyQRDjGc8J4fCR7+2+ywltRv4rCG6m1xSb3b5M82/1MBEw35+Z2457K5pBqVt xbSiR+Od3/SkNyOXZyUs5UFDEGG1UOgsVXH20= Received: by 10.42.198.209 with SMTP id ep17mr1602373icb.524.1308308802040; Fri, 17 Jun 2011 04:06:42 -0700 (PDT) Received: from [218.172.238.223] (218-172-238-223.dynamic.hinet.net [218.172.238.223]) by mx.google.com with ESMTPS id d6sm2476168icx.13.2011.06.17.04.06.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2011 04:06:41 -0700 (PDT) Subject: [PATCH] mtd: onenand: remove redundant mtd_device_unregister before onenand_release From: Axel Lin To: linux-kernel@vger.kernel.org Date: Fri, 17 Jun 2011 19:06:33 +0800 Message-ID: <1308308793.2628.0.camel@phoenix> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110617_070645_846769_06FF4585 X-CRM114-Status: GOOD ( 11.19 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (axel.lin[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: Artem Bityutskiy , Kyungmin Park , David Woodhouse , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org onenand_release() will call mtd_device_unregister(), thus remove the redundant mtd_device_unregister() call before onenand_release(). Signed-off-by: Axel Lin --- drivers/mtd/onenand/generic.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index 8152a31..7813095 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c @@ -97,7 +97,6 @@ static int __devexit generic_onenand_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); if (info) { - mtd_device_unregister(&info->mtd); onenand_release(&info->mtd); release_mem_region(res->start, size); iounmap(info->onenand.base);