aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorShiraz Hashim <shiraz.hashim@st.com>2012-01-20 05:35:19 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:14:36 -0400
commit495c47d799d93ad688db9db170200eb71525ff45 (patch)
treebd0e925a755536e9e976959536ae19c4fa5fa161 /drivers/mtd
parentf18dbbb1bfe06ea3995b55c2f533057da9e9294a (diff)
mtd: spear_smi: release memory region during remove
Driver must cleanup all held resources during remove. It wasn't releasing requested memory region. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/spear_smi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 1eac56cf8ed6..0f0f1ac06493 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -1024,6 +1024,7 @@ static int __devexit spear_smi_remove(struct platform_device *pdev)
1024{ 1024{
1025 struct spear_smi *dev; 1025 struct spear_smi *dev;
1026 struct spear_snor_flash *flash; 1026 struct spear_snor_flash *flash;
1027 struct resource *smi_base;
1027 int ret; 1028 int ret;
1028 int i, irq; 1029 int i, irq;
1029 1030
@@ -1055,6 +1056,9 @@ static int __devexit spear_smi_remove(struct platform_device *pdev)
1055 clk_put(dev->clk); 1056 clk_put(dev->clk);
1056 iounmap(dev->io_base); 1057 iounmap(dev->io_base);
1057 kfree(dev); 1058 kfree(dev);
1059
1060 smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1061 release_mem_region(smi_base->start, resource_size(smi_base));
1058 platform_set_drvdata(pdev, NULL); 1062 platform_set_drvdata(pdev, NULL);
1059 1063
1060 return 0; 1064 return 0;