mtd/spear_smi: release memory region during remove
PATCH 1/1 mtd/spear_smi: release memory region during remove
From: Shiraz Hashim <[email protected]>
Driver must cleanup all held resources during remove. It wasn't releasing requested memory region.
Signed-off-by Shiraz Hashim <[email protected]>
Signed-off-by Stefan Roese <[email protected]>
Cc Artem Bityutskiy <[email protected]>
---
Artem, this patch is a recent fixup to the new SMI driver, thats now sitting in your l2-mtd and linux-next git repo.
Stefan
drivers/mtd/devices/spear_smi.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/mtd/devices/spear_smi.c +4 -0
@@ -1032,6 +1032,7 @@ static int __devexit spear_smi_remove(struct platform_device *pdev) {struct spear_smi *dev;struct spear_snor_flash *flash; +struct resource *smi_base;int ret;int i, irq;
@@ -1067,6 +1068,9 @@ static int __devexit spear_smi_remove(struct platform_device *pdev)clk_put (dev->clk);iounmap (dev->io_base);kfree (dev); + + smi_base =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +release_mem_region (smi_base->start,resource_size (smi_base));platform_set_drvdata (pdev,NULL );return 0 ;
Signature · 1 line
1.7.9.rc0
Artem Bityutskiy
AppliedQuoted 4 lines · Stefan Roese
From: Shiraz Hashim <[email protected]>
Driver must cleanup all held resources during remove. It wasn't releasing requested memory region.
Pushed to l2-mtd, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy