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>
{
struct spear_smi *dev;
struct spear_snor_flash *flash;
+ struct resource *smi_base;
int ret;
int i, irq;
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;