From: Afzal Mohammed Date: Sat, 29 Sep 2012 05:44:47 +0000 (+0530) Subject: mtd: nand: omap: free region as per resource size X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=48b51d4dda3195320ec95b3393f44bfb060653c1;p=linux-beck.git mtd: nand: omap: free region as per resource size memory as is now obtained via resource, upon freeing use resource size. This also helps get rid of one macro. Signed-off-by: Afzal Mohammed --- diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 5b3138620646..4c331356a882 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1513,7 +1513,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); + release_mem_region(info->phys_base, info->mem_size); kfree(info); return 0; }