aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2015-03-13 07:23:47 -0400
committerBrian Norris <computersforpeace@gmail.com>2015-04-05 20:47:56 -0400
commit95d706657311f24407d0f7a0cf79b55904ec6524 (patch)
tree19f46f23db1169b415ad284b589dd9a8cbe889e6 /drivers/mtd
parent41c7540d0c4e362212845aa2258c15aaa878665f (diff)
mtd: fsl_ifc_nand: use msecs_to_jiffies for time conversion
This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var) which helps readability and also handles all corner-cases properly. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/fsl_ifc_nand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 4c05f4f6a5c6..51394e59901b 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -317,7 +317,7 @@ static void fsl_ifc_run_command(struct mtd_info *mtd)
317 317
318 /* wait for command complete flag or timeout */ 318 /* wait for command complete flag or timeout */
319 wait_event_timeout(ctrl->nand_wait, ctrl->nand_stat, 319 wait_event_timeout(ctrl->nand_wait, ctrl->nand_stat,
320 IFC_TIMEOUT_MSECS * HZ/1000); 320 msecs_to_jiffies(IFC_TIMEOUT_MSECS));
321 321
322 /* ctrl->nand_stat will be updated from IRQ context */ 322 /* ctrl->nand_stat will be updated from IRQ context */
323 if (!ctrl->nand_stat) 323 if (!ctrl->nand_stat)
@@ -860,7 +860,7 @@ static void fsl_ifc_sram_init(struct fsl_ifc_mtd *priv)
860 860
861 /* wait for command complete flag or timeout */ 861 /* wait for command complete flag or timeout */
862 wait_event_timeout(ctrl->nand_wait, ctrl->nand_stat, 862 wait_event_timeout(ctrl->nand_wait, ctrl->nand_stat,
863 IFC_TIMEOUT_MSECS * HZ/1000); 863 msecs_to_jiffies(IFC_TIMEOUT_MSECS));
864 864
865 if (ctrl->nand_stat != IFC_NAND_EVTER_STAT_OPC) 865 if (ctrl->nand_stat != IFC_NAND_EVTER_STAT_OPC)
866 printk(KERN_ERR "fsl-ifc: Failed to Initialise SRAM\n"); 866 printk(KERN_ERR "fsl-ifc: Failed to Initialise SRAM\n");