summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm/InterfaceIdleMode.c
diff options
context:
space:
mode:
authorGokulnath Avanashilingam2013-12-20 16:24:31 +0100
committerGreg Kroah-Hartman2013-12-20 20:47:42 +0100
commite42ff08dd9626e1cbb824837734e3c3c633d5ad1 (patch)
tree63764602075936bb4da3fb5caad8ac47d2729a4d /drivers/staging/bcm/InterfaceIdleMode.c
parentstaging: bcm: line over 80 characters in InterfaceIdleMode.c (diff)
downloadkernel-qcow2-linux-e42ff08dd9626e1cbb824837734e3c3c633d5ad1.tar.gz
kernel-qcow2-linux-e42ff08dd9626e1cbb824837734e3c3c633d5ad1.tar.xz
kernel-qcow2-linux-e42ff08dd9626e1cbb824837734e3c3c633d5ad1.zip
staging: bcm: using time_after and time_before in InterfaceIdleMode.c
Used the time_after and time_before insted of comparing the jiffies directly.This will fix the warnings and errors found by the checkpatch.pl script. Signed-off-by: Gokulnath Avanashilingam <Gokulnath.Avanashilingam@in.bosch.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/bcm/InterfaceIdleMode.c')
-rw-r--r--drivers/staging/bcm/InterfaceIdleMode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/bcm/InterfaceIdleMode.c b/drivers/staging/bcm/InterfaceIdleMode.c
index 97408d3b031d..dd611963f636 100644
--- a/drivers/staging/bcm/InterfaceIdleMode.c
+++ b/drivers/staging/bcm/InterfaceIdleMode.c
@@ -56,7 +56,7 @@ int InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter,
int bytes;
if (ntohl(*puiBuffer) == GO_TO_IDLE_MODE_PAYLOAD) {
- if (ntohl(*(puiBuffer+1)) == 0 ) {
+ if (ntohl(*(puiBuffer+1)) == 0) {
status = wrmalt (Adapter, SW_ABORT_IDLEMODE_LOC,
&uiRegRead, sizeof(uiRegRead));
@@ -196,7 +196,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter,
/* mdelay(25); */
timeout = jiffies + msecs_to_jiffies(50) ;
- while ( timeout > jiffies ) {
+ while (time_after(timeout, jiffies)) {
itr++ ;
rdmalt(Adapter, CHIP_ID_REG, &chip_id, sizeof(UINT));
if (0xbece3200 == (chip_id&~(0xF0)))
@@ -204,7 +204,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter,
if (chip_id == Adapter->chip_id)
break;
}
- if ( timeout < jiffies )
+ if (time_before(timeout, jiffies))
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
IDLE_MODE, DBG_LVL_ALL,
"Not able to read chip-id even after 25 msec");