aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/pxa3xx_nand.c
diff options
context:
space:
mode:
authorMike Rapoport <mike@compulab.co.il>2009-02-17 06:54:46 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-03-20 14:37:33 -0400
commit82a72d108b4fbcc8f651b7c4e34c6f18a605d58d (patch)
treecc9d561286eca9f8696324f069309958fc94adec /drivers/mtd/nand/pxa3xx_nand.c
parentb2ed3680553b451e5c45064de26ea8fa5201c6d4 (diff)
[MTD] [NAND] pxa3xx_nand: allow building as module
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/pxa3xx_nand.c')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index ffa960baa7e..ead4a7a72d4 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1079,6 +1079,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
1079 1079
1080 this = &info->nand_chip; 1080 this = &info->nand_chip;
1081 mtd->priv = info; 1081 mtd->priv = info;
1082 mtd->owner = THIS_MODULE;
1082 1083
1083 info->clk = clk_get(&pdev->dev, NULL); 1084 info->clk = clk_get(&pdev->dev, NULL);
1084 if (IS_ERR(info->clk)) { 1085 if (IS_ERR(info->clk)) {
@@ -1187,6 +1188,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
1187{ 1188{
1188 struct mtd_info *mtd = platform_get_drvdata(pdev); 1189 struct mtd_info *mtd = platform_get_drvdata(pdev);
1189 struct pxa3xx_nand_info *info = mtd->priv; 1190 struct pxa3xx_nand_info *info = mtd->priv;
1191 struct resource *r;
1190 1192
1191 platform_set_drvdata(pdev, NULL); 1193 platform_set_drvdata(pdev, NULL);
1192 1194
@@ -1199,6 +1201,14 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
1199 info->data_buff, info->data_buff_phys); 1201 info->data_buff, info->data_buff_phys);
1200 } else 1202 } else
1201 kfree(info->data_buff); 1203 kfree(info->data_buff);
1204
1205 iounmap(info->mmio_base);
1206 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1207 release_mem_region(r->start, resource_size(r));
1208
1209 clk_disable(info->clk);
1210 clk_put(info->clk);
1211
1202 kfree(mtd); 1212 kfree(mtd);
1203 return 0; 1213 return 0;
1204} 1214}