diff options
author | Toan Pham <tpham3783@gmail.com> | 2013-03-15 18:44:59 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 14:22:30 +0200 |
commit | 4ff6772b5bb17ef40e64abf2c0d5f6aefd104b06 (patch) | |
tree | 11fd833b24d3370b75571f658910d9b8a4a1afc8 /drivers | |
parent | mtd: nand_ids: use size macros (diff) | |
download | linux-4ff6772b5bb17ef40e64abf2c0d5f6aefd104b06.tar.xz linux-4ff6772b5bb17ef40e64abf2c0d5f6aefd104b06.zip |
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 <tpham3783@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/omap2.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)) { |