[PATCH 2/3] omap : nand : fix omap2 module reinsertion

Bryan DE FARIA bdefaria at adeneo-embedded.com
Fri Apr 29 06:31:09 EDT 2011


When the module is removed, a reinsertion will fail with a -16 error.

Signed-off-by: Bryan DE FARIA <bdefaria at adeneo-embedded.com>
---
 drivers/mtd/nand/omap2.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index da9a351..eab51da 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1138,6 +1138,7 @@ 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.IO_ADDR_R);
 	kfree(&info->mtd);
 	return 0;
-- 
1.7.1




More information about the linux-mtd mailing list