staging: rtl8188eu: Use msecs_to_jiffies() instead of rtw_ms_to_systime()
authornavin patidar <navin.patidar@gmail.com>
Thu, 10 Jul 2014 03:42:25 +0000 (09:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2014 04:15:21 +0000 (21:15 -0700)
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/os_dep/osdep_service.c

index 439bc8f70d032b699d691cc1fcc06796862cb525..27ed83cca193588a3db80cb550bc0a10f3049416 100644 (file)
@@ -551,7 +551,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
 inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
 {
        struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-       pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ms);
+       pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ms);
 }
 
 /*
@@ -568,9 +568,9 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
        unsigned long expires;
        int ret = _SUCCESS;
 
-       expires = jiffies + rtw_ms_to_systime(ips_deffer_ms);
+       expires = jiffies + msecs_to_jiffies(ips_deffer_ms);
        if (time_before(pwrpriv->ips_deny_time, expires))
-               pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
+               pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
 
 {
        u32 start = jiffies;
@@ -624,9 +624,9 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
        }
 
 exit:
-       expires = jiffies + rtw_ms_to_systime(ips_deffer_ms);
+       expires = jiffies + msecs_to_jiffies(ips_deffer_ms);
        if (time_before(pwrpriv->ips_deny_time, expires))
-               pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
+               pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
        return ret;
 }
 
index 3ddaa34c761a4085685282cfe46e95e773a32599..238930c7d43071782805ccc5d9f8585db62ee467 100644 (file)
@@ -154,7 +154,6 @@ u32  _rtw_down_sema(struct semaphore *sema);
 
 void _rtw_init_queue(struct __queue *pqueue);
 
-u32  rtw_ms_to_systime(u32 ms);
 s32  rtw_get_passing_time_ms(u32 start);
 
 struct rtw_netdev_priv_indicator {
index 96f8eb88b06d2ba43bbabc3547988572c8ad2fa8..db6ee3103e24c565145e9e22dae9a88d06d5cc70 100644 (file)
@@ -77,11 +77,6 @@ void _rtw_init_queue(struct __queue *pqueue)
        spin_lock_init(&(pqueue->lock));
 }
 
-inline u32 rtw_ms_to_systime(u32 ms)
-{
-       return ms * HZ / 1000;
-}
-
 /*  the input parameter start must be in jiffies */
 inline s32 rtw_get_passing_time_ms(u32 start)
 {