From: Toan Pham Date: Fri, 15 Mar 2013 17:44:59 +0000 (-0700) Subject: mtd: omap2: use msecs_to_jiffies() X-Git-Tag: next-20130422~72^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4ff6772b5bb17ef40e64abf2c0d5f6aefd104b06;p=karo-tx-linux.git mtd: omap2: use msecs_to_jiffies() Fix mtd-utils from returning -EIO. Formatting jffs2 filesystem was impossible when CONFIG_HZ was set to a low value. Signed-off-by: Toan Pham Signed-off-by: Brian Norris Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index b97ef3b68ec6..81b80af55872 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1023,9 +1023,9 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip) int status, state = this->state; if (state == FL_ERASING) - timeo += (HZ * 400) / 1000; + timeo += msecs_to_jiffies(400); else - timeo += (HZ * 20) / 1000; + timeo += msecs_to_jiffies(20); writeb(NAND_CMD_STATUS & 0xFF, info->reg.gpmc_nand_command); while (time_before(jiffies, timeo)) {