/* This function is a veneer that replaces the function originally installed by the NAND Flash MTD code.  */
static int mxs_nand_hook_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
/* This function is a veneer that replaces the function originally installed by the NAND Flash MTD code.  */
static int mxs_nand_hook_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	struct mxs_nand_info *nand_info = nand_get_controller_data(chip);
	int ret;
	if (ops->mode == MTD_OPS_RAW)
		nand_info->raw_oob_mode = 1;
	else
		nand_info->raw_oob_mode = 0;
	ret = nand_info->hooked_read_oob(mtd, from, ops);
	nand_info->raw_oob_mode = 0;
	return ret;
}