staging: fsl-mc: changed timeout units for MC cmd completion
authorJ. German Rivera <German.Rivera@freescale.com>
Sat, 17 Oct 2015 20:33:12 +0000 (15:33 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 03:54:46 +0000 (20:54 -0700)
Changed units for the timeout to wait for completion
of MC command, from jiffies to milliseconds.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/mc-sys.c

index 07848a0cbe5a618f788f0d4e44a36626cfaefe8a..2c5f1096e594f046b06f88bd69da6c58f79b5c93 100644 (file)
@@ -42,9 +42,9 @@
 #include "dpmcp.h"
 
 /**
- * Timeout in jiffies to wait for the completion of an MC command
+ * Timeout in milliseconds to wait for the completion of an MC command
  */
-#define MC_CMD_COMPLETION_TIMEOUT_JIFFIES   (HZ / 2)   /* 500 ms */
+#define MC_CMD_COMPLETION_TIMEOUT_MS   500
 
 /*
  * usleep_range() min and max values used to throttle down polling
@@ -305,7 +305,7 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
 {
        enum mc_cmd_status status;
        unsigned long jiffies_until_timeout =
-           jiffies + MC_CMD_COMPLETION_TIMEOUT_JIFFIES;
+               jiffies + msecs_to_jiffies(MC_CMD_COMPLETION_TIMEOUT_MS);
 
        /*
         * Send command to the MC hardware:
This page took 0.025552 seconds and 5 git commands to generate.