mted: nand_wait_ready timeout fix
authorMatthieu CASTET <matthieu.castet@parrot.com>
Thu, 22 Nov 2012 17:31:28 +0000 (18:31 +0100)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 3 Dec 2012 14:36:52 +0000 (16:36 +0200)
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>
drivers/mtd/nand/nand_base.c

index 55c2883af406e8ae223e62a1b50ce14401249b68..7738432c62ddc6f4364a1f24536d86eca8475910 100644 (file)
@@ -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)