aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMatthieu CASTET <matthieu.castet@parrot.com>2012-11-22 12:31:28 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-12-03 09:36:52 -0500
commitca6a24893073414c549920d93bac57d46d7f3e1e (patch)
tree99fe9588a5a25320b8bba26c97594a53056cef77 /drivers/mtd
parenta6b3ed29ae3fd9853280d4f6a9275c43fb4e1c3b (diff)
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 <matthieu.castet@parrot.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/nand_base.c2
1 files changed, 1 insertions, 1 deletions
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)
490void nand_wait_ready(struct mtd_info *mtd) 490void nand_wait_ready(struct mtd_info *mtd)
491{ 491{
492 struct nand_chip *chip = mtd->priv; 492 struct nand_chip *chip = mtd->priv;
493 unsigned long timeo = jiffies + 2; 493 unsigned long timeo = jiffies + msecs_to_jiffies(20);
494 494
495 /* 400ms timeout */ 495 /* 400ms timeout */
496 if (in_interrupt() || oops_in_progress) 496 if (in_interrupt() || oops_in_progress)