Re: [PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
On Mon, Jan 21, 2013 at 10:27 PM, Matthieu CASTET wrote: > Could you explain why the old code was wrong ? sorry. this patch has a compiler error. > > With HZ=100 > > timeo = jiffies + 2 and it should be working. > In logic, timeo should only be 2, just like it does in panic_nand_write(). t

Re: [PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Matthieu CASTET
Could you explain why the old code was wrong ? With HZ=100 timeo = jiffies + 2 and it should be working. Huang Shijie a écrit : > In nand_wait(), the timeo for panic_nand_wait() is assigned with > wrong value(jiffies + some delay). > > This patch fixes it, and also uses the msecs_to_jiffies()

[PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
In nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). This patch fixes it, and also uses the msecs_to_jiffies() to make the code more readable. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |8 ++-- 1 files changed, 2 insertio