public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 2/3]NAND: OMAP: Fixing omap nand driver, compiled as module
@ 2009-10-30  6:21 Vimal Singh
  2009-10-30  8:42 ` Vimal Singh
  0 siblings, 1 reply; 11+ messages in thread
From: Vimal Singh @ 2009-10-30  6:21 UTC (permalink / raw)
  To: Linux MTD

From: Vimal Singh <vimalsingh@ti.com>
Date: Fri, 30 Oct 2009 11:32:17 +0530
Subject: [PATCH] NAND: OMAP: Fixing omap nand driver, compiled as module

Removing OMAP NAND driver, when loaded as a module, gives error and
does not get success. This fixes this and makes driver loadable and
removable run time.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
---
 drivers/mtd/nand/omap2.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 92573d5..ecc4d32 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1056,7 +1056,8 @@ out_free_info:
 static int omap_nand_remove(struct platform_device *pdev)
 {
 	struct mtd_info *mtd = platform_get_drvdata(pdev);
-	struct omap_nand_info *info = mtd->priv;
+	struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
+							mtd);

 	platform_set_drvdata(pdev, NULL);
 	if (use_dma)
@@ -1064,7 +1065,9 @@ static int omap_nand_remove(struct platform_device *pdev)

 	/* Release NAND device, its internal structures and partitions */
 	nand_release(&info->mtd);
+	release_mem_region(info->phys_base, NAND_IO_SIZE);
 	iounmap(info->nand_pref_fifo_add);
+	gpmc_cs_free(info->gpmc_cs);
 	kfree(&info->mtd);
 	return 0;
 }
-- 
1.5.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-11-11 18:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30  6:21 [PATCH 2/3]NAND: OMAP: Fixing omap nand driver, compiled as module Vimal Singh
2009-10-30  8:42 ` Vimal Singh
2009-10-30  9:27   ` Vimal Singh
2009-11-03  8:28     ` Artem Bityutskiy
2009-11-03  8:35       ` Vimal Singh
2009-11-03  8:39         ` Artem Bityutskiy
2009-11-03  8:48           ` Vimal Singh
2009-11-10 14:23     ` Artem Bityutskiy
2009-11-10 18:56       ` Tony Lindgren
2009-11-11  4:46         ` Vimal Singh
2009-11-11 18:43           ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox