summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/onenand/onenand_base.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 2e3d0e5..8282f68 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1919,6 +1919,7 @@ static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
*/
int onenand_block_markbad(struct mtd_info *mtd, loff_t ofs)
{
+ struct onenand_chip *this = mtd->priv;
int ret;
ret = onenand_block_isbad(mtd, ofs);
@@ -1929,7 +1930,10 @@ int onenand_block_markbad(struct mtd_info *mtd, loff_t ofs)
return ret;
}
- ret = mtd_block_markbad(mtd, ofs);
+ onenand_get_device(mtd, FL_WRITING);
+ ret = this->block_markbad(mtd, ofs);
+ onenand_release_device(mtd);
+
return ret;
}