Patchwork mtd: denali: remove calling mtd_device_unregister() after nand_release()

login
register
mail settings
Submitter Axel Lin
Date June 3, 2011, 1:12 a.m.
Message ID <1307063535.10001.1.camel@phoenix>
Download mbox | patch
Permalink /patch/98501/
State Accepted
Commit b07948251f563379885ac92412fb3885c976e423
Headers show

Comments

Axel Lin - June 3, 2011, 1:12 a.m.
The implementation of nand_release() already call mtd_device_unregister(),
no need to call it again.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mtd/nand/denali.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Jamie Iles - June 3, 2011, 9:20 a.m.
On Fri, Jun 03, 2011 at 09:12:15AM +0800, Axel Lin wrote:
> The implementation of nand_release() already call mtd_device_unregister(),
> no need to call it again.

Good catch!

> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Jamie Iles <jamie@jamieiles.com>
Artem Bityutskiy - June 6, 2011, 10:07 a.m.
On Fri, 2011-06-03 at 09:12 +0800, Axel Lin wrote:
> The implementation of nand_release() already call mtd_device_unregister(),
> no need to call it again.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

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

Patch

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index d527621..e119748 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1676,7 +1676,6 @@  static void denali_pci_remove(struct pci_dev *dev)
 	struct denali_nand_info *denali = pci_get_drvdata(dev);
 
 	nand_release(&denali->mtd);
-	mtd_device_unregister(&denali->mtd);
 
 	denali_irq_cleanup(dev->irq, denali);