/* This function is a veneer that replaces the function originally installed by the NAND Flash MTD code.  */
static int mxs_nand_hook_block_markbad(struct mtd_info *mtd, loff_t ofs)
/* This function is a veneer that replaces the function originally installed by the NAND Flash MTD code.  */
static int mxs_nand_hook_block_markbad(struct mtd_info *mtd, loff_t ofs)
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct mxs_nand_info *nand_info = nand_get_controller_data(chip);
	int ret;
	nand_info->marking_block_bad = 1;
	ret = nand_info->hooked_block_markbad(mtd, ofs);
	nand_info->marking_block_bad = 0;
	return ret;
}