diff options
Diffstat (limited to 'drivers/mtd/onenand/omap2.c')
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 38d656b9b2ee..0108ed42e877 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -266,7 +266,7 @@ static inline int omap2_onenand_bufferram_offset(struct mtd_info *mtd, int area) | |||
266 | 266 | ||
267 | if (ONENAND_CURRENT_BUFFERRAM(this)) { | 267 | if (ONENAND_CURRENT_BUFFERRAM(this)) { |
268 | if (area == ONENAND_DATARAM) | 268 | if (area == ONENAND_DATARAM) |
269 | return mtd->writesize; | 269 | return this->writesize; |
270 | if (area == ONENAND_SPARERAM) | 270 | if (area == ONENAND_SPARERAM) |
271 | return mtd->oobsize; | 271 | return mtd->oobsize; |
272 | } | 272 | } |
@@ -770,6 +770,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev) | |||
770 | } | 770 | } |
771 | iounmap(c->onenand.base); | 771 | iounmap(c->onenand.base); |
772 | release_mem_region(c->phys_base, ONENAND_IO_SIZE); | 772 | release_mem_region(c->phys_base, ONENAND_IO_SIZE); |
773 | gpmc_cs_free(c->gpmc_cs); | ||
773 | kfree(c); | 774 | kfree(c); |
774 | 775 | ||
775 | return 0; | 776 | return 0; |