Patchwork mtd: davinci_nand: remove redundant mtd_device_unregister in nand_davinci_remove

login
register
mail settings
Submitter Axel Lin
Date June 8, 2011, 1:01 p.m.
Message ID <1307538097.17552.4.camel@phoenix>
Download mbox | patch
Permalink /patch/99421/
State Accepted
Commit 3b36013cf9cc1a1da93ad6bb8f6d3b0221f67e42
Headers show

Comments

Axel Lin - June 8, 2011, 1:01 p.m.
mtd_device_unregister is done in nand_release(),
thus no need to call it in nand_davinci_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mtd/nand/davinci_nand.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
Artem Bityutskiy - June 8, 2011, 2:52 p.m.
On Wed, 2011-06-08 at 21:01 +0800, Axel Lin wrote:
> mtd_device_unregister is done in nand_release(),
> thus no need to call it in nand_davinci_remove().
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

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

Patch

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 0c582ed..70c92a5 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -811,9 +811,6 @@  err_nomem:
 static int __exit nand_davinci_remove(struct platform_device *pdev)
 {
 	struct davinci_nand_info *info = platform_get_drvdata(pdev);
-	int status;
-
-	status = mtd_device_unregister(&info->mtd);
 
 	spin_lock_irq(&davinci_nand_lock);
 	if (info->chip.ecc.mode == NAND_ECC_HW_SYNDROME)