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>
This commit is contained in:
parent
786bdddc36
commit
e42ff08dd9
1 changed files with 3 additions and 3 deletions
|
@ -196,7 +196,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter,
|
||||||
/* mdelay(25); */
|
/* mdelay(25); */
|
||||||
|
|
||||||
timeout = jiffies + msecs_to_jiffies(50) ;
|
timeout = jiffies + msecs_to_jiffies(50) ;
|
||||||
while ( timeout > jiffies ) {
|
while (time_after(timeout, jiffies)) {
|
||||||
itr++ ;
|
itr++ ;
|
||||||
rdmalt(Adapter, CHIP_ID_REG, &chip_id, sizeof(UINT));
|
rdmalt(Adapter, CHIP_ID_REG, &chip_id, sizeof(UINT));
|
||||||
if (0xbece3200 == (chip_id&~(0xF0)))
|
if (0xbece3200 == (chip_id&~(0xF0)))
|
||||||
|
@ -204,7 +204,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter,
|
||||||
if (chip_id == Adapter->chip_id)
|
if (chip_id == Adapter->chip_id)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( timeout < jiffies )
|
if (time_before(timeout, jiffies))
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
|
||||||
IDLE_MODE, DBG_LVL_ALL,
|
IDLE_MODE, DBG_LVL_ALL,
|
||||||
"Not able to read chip-id even after 25 msec");
|
"Not able to read chip-id even after 25 msec");
|
||||||
|
|
Loading…
Add table
Reference in a new issue