Commit 495c47d7 authored by Shiraz Hashim's avatar Shiraz Hashim Committed by David Woodhouse

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: default avatarShiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: default avatarStefan Roese <sr@denx.de>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent f18dbbb1
......@@ -1024,6 +1024,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;
......@@ -1055,6 +1056,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment