Skip to content

Commit

Permalink
mted: nand_wait_ready timeout fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthieu CASTET authored and Artem Bityutskiy committed Dec 3, 2012
1 parent a6b3ed2 commit ca6a248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ca6a248

Please sign in to comment.