/* Helper function for nand_wait_ready used when needing to wait in interrupt context.  */
static void panic_nand_wait_ready(struct mtd_info *mtd, unsigned long timeo)
/* Helper function for nand_wait_ready used when needing to wait in interrupt context.  */
static void panic_nand_wait_ready(struct mtd_info *mtd, unsigned long timeo)
{
	struct nand_chip *chip = mtd->priv;
	int i;
	for (i = 0; i < timeo; i++) {
		if (chip->dev_ready(mtd))
			break;
		touch_softlockup_watchdog();
		mdelay(1);
	}
}