summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas@biessmann.de>2012-08-31 13:35:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-13 05:50:34 +0900
commitccf5af221ef1f5d59f10f74ae1f08f9b289d0e6e (patch)
tree5e4fb68dde3db3a91ab4e20252d40529532cb22d /drivers
parentee9be6a8ac6ca6b37f228cde4ee2b56b1090dd0b (diff)
mtd: omap2: fix module loading
commit 4d3d688da8e7016f15483e9319b41311e1db9515 upstream. 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@biessmann.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/omap2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 4cd7ac09017f..48f1d4ede35c 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1387,6 +1387,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;
}