From: Matthieu CASTET Date: Thu, 22 Nov 2012 17:31:28 +0000 (+0100) Subject: mted: nand_wait_ready timeout fix X-Git-Tag: firefly_0821_release~3680^2~1388^2~19 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ca6a24893073414c549920d93bac57d46d7f3e1e;p=firefly-linux-kernel-4.4.55.git mted: nand_wait_ready timeout fix nand_wait_ready timeout should not assume HZ=100. Make it independent of HZ value by using msecs_to_jiffies. Signed-off-by: Matthieu CASTET Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 55c2883af406..7738432c62dd 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -490,7 +490,7 @@ static void panic_nand_wait_ready(struct mtd_info *mtd, unsigned long timeo) void nand_wait_ready(struct mtd_info *mtd) { struct nand_chip *chip = mtd->priv; - unsigned long timeo = jiffies + 2; + unsigned long timeo = jiffies + msecs_to_jiffies(20); /* 400ms timeout */ if (in_interrupt() || oops_in_progress)