mtd: omap2: fix module loading

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:12 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4d3d688da8e7016f15483e9319b41311e1db9515
Commit:     4d3d688da8e7016f15483e9319b41311e1db9515
Parent:     7d9b110269253b1d5858cfa57d68dfc7bf50dd77
Author:     Andreas Bießmann <andreas at biessmann.de>
AuthorDate: Fri Aug 31 13:35:42 2012 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sat Sep 29 15:29:51 2012 +0100

    mtd: omap2: fix module loading
    
    Unloading the omap2 nand driver missed to release the memory region which will
    result in not being able to request it again if one want to load the driver
    later on.
    
    This patch fixes following error when loading omap2 module after unloading:
    ---8<---
    ~ $ rmmod omap2
    ~ $ modprobe omap2
    [   37.420928] omap2-nand: probe of omap2-nand.0 failed with error -16
    ~ $
    --->8---
    
    This error was introduced in 67ce04bf2746f8a1f8c2a104b313d20c63f68378 which
    was the first commit of this driver.
    
    Signed-off-by: Andreas Bießmann <andreas at biessmann.de>
    Cc: stable at vger.kernel.org
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.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 e604a45..9142005 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1364,6 +1364,7 @@ static int omap_nand_remove(struct platform_device *pdev)
 	/* Release NAND device, its internal structures and partitions */
 	nand_release(&info->mtd);
 	iounmap(info->nand.IO_ADDR_R);
+	release_mem_region(info->phys_base, NAND_IO_SIZE);
 	kfree(info);
 	return 0;
 }



More information about the linux-mtd-cvs mailing list