Patchwork mtd: onenand: remove redundant mtd_device_unregister before onenand_release

login
register
mail settings
Submitter Axel Lin
Date June 17, 2011, 11:06 a.m.
Message ID <1308308793.2628.0.camel@phoenix>
Download mbox | patch
Permalink /patch/100795/
State New
Headers show

Comments

Axel Lin - June 17, 2011, 11:06 a.m.
onenand_release() will call mtd_device_unregister(), thus remove the redundant
mtd_device_unregister() call before onenand_release().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mtd/onenand/generic.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Artem Bityutskiy - June 22, 2011, 5:05 a.m.
On Fri, 2011-06-17 at 19:06 +0800, Axel Lin wrote:
> onenand_release() will call mtd_device_unregister(), thus remove the redundant
> mtd_device_unregister() call before onenand_release().
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Pushed to l2-mtd-2.6.git, thanks.

Patch

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);