diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 68ae144ce3be..4e7073954e53 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -334,7 +334,7 @@ config MTD_NAND_ATMEL_ECC_NONE | |||
334 | endchoice | 334 | endchoice |
335 | 335 | ||
336 | config MTD_NAND_PXA3xx | 336 | config MTD_NAND_PXA3xx |
337 | bool "Support for NAND flash devices on PXA3xx" | 337 | tristate "Support for NAND flash devices on PXA3xx" |
338 | depends on MTD_NAND && PXA3xx | 338 | depends on MTD_NAND && PXA3xx |
339 | help | 339 | help |
340 | This enables the driver for the NAND flash device found on | 340 | This enables the driver for the NAND flash device found on |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index ffa960baa7e7..ead4a7a72d44 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 | } |