From 4063642bd4efc2658e023fb455bd56881a76d6c7 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 19 Dec 2013 22:38:42 -0600 Subject: [PATCH] staging: r8188eu: Replace wrappers ODM_delay_ms() and rtw_mdelay_os() with a simple mdelay Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/core/rtw_mp.c | 4 ++-- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 10 +++++----- drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c | 12 ++++++------ drivers/staging/rtl8188eu/hal/odm_interface.c | 5 ----- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- drivers/staging/rtl8188eu/include/odm_interface.h | 2 -- drivers/staging/rtl8188eu/include/osdep_service.h | 1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c | 5 ----- 9 files changed, 15 insertions(+), 28 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mp.c b/drivers/staging/rtl8188eu/core/rtw_mp.c index 76c11989b61a..6451efdfb132 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mp.c +++ b/drivers/staging/rtl8188eu/core/rtw_mp.c @@ -858,11 +858,11 @@ static u32 rtw_GetPSDData(struct adapter *pAdapter, u32 point) psd_val |= point; rtw_write32(pAdapter, 0x808, psd_val); - rtw_mdelay_os(1); + mdelay(1); psd_val |= 0x00400000; rtw_write32(pAdapter, 0x808, psd_val); - rtw_mdelay_os(1); + mdelay(1); psd_val = rtw_read32(pAdapter, 0x8B4); psd_val &= 0x0000FFFF; diff --git a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c index 650aefc08190..a317c9e4d60c 100644 --- a/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c +++ b/drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c @@ -502,7 +502,7 @@ phy_PathA_IQK_8188E(struct adapter *adapt, bool configPathB) /* delay x ms */ ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Delay %d ms for One shot, path A LOK & IQK.\n", IQK_DELAY_TIME_88E)); /* PlatformStallExecution(IQK_DELAY_TIME_88E*1000); */ - ODM_delay_ms(IQK_DELAY_TIME_88E); + mdelay(IQK_DELAY_TIME_88E); /* Check failed */ regeac = ODM_GetBBReg(dm_odm, rRx_Power_After_IQK_A_2, bMaskDWord); @@ -568,7 +568,7 @@ phy_PathA_RxIQK(struct adapter *adapt, bool configPathB) ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Delay %d ms for One shot, path A LOK & IQK.\n", IQK_DELAY_TIME_88E)); - ODM_delay_ms(IQK_DELAY_TIME_88E); + mdelay(IQK_DELAY_TIME_88E); /* Check failed */ regeac = ODM_GetBBReg(dm_odm, rRx_Power_After_IQK_A_2, bMaskDWord); @@ -623,7 +623,7 @@ phy_PathA_RxIQK(struct adapter *adapt, bool configPathB) /* delay x ms */ ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Delay %d ms for One shot, path A LOK & IQK.\n", IQK_DELAY_TIME_88E)); /* PlatformStallExecution(IQK_DELAY_TIME_88E*1000); */ - ODM_delay_ms(IQK_DELAY_TIME_88E); + mdelay(IQK_DELAY_TIME_88E); /* Check failed */ regeac = ODM_GetBBReg(dm_odm, rRx_Power_After_IQK_A_2, bMaskDWord); @@ -667,7 +667,7 @@ phy_PathB_IQK_8188E(struct adapter *adapt) ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Delay %d ms for One shot, path B LOK & IQK.\n", IQK_DELAY_TIME_88E)); - ODM_delay_ms(IQK_DELAY_TIME_88E); + mdelay(IQK_DELAY_TIME_88E); /* Check failed */ regeac = ODM_GetBBReg(dm_odm, rRx_Power_After_IQK_A_2, bMaskDWord); @@ -1447,7 +1447,7 @@ void PHY_LCCalibrate_8188E(struct adapter *adapt) return; while (*(dm_odm->pbScanInProcess) && timecount < timeout) { - ODM_delay_ms(50); + mdelay(50); timecount += 50; } diff --git a/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c b/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c index 48cea29a2b0b..4f8c3bb82d52 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c @@ -27,9 +27,9 @@ void odm_ConfigRFReg_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, if (Addr == 0xffe) { msleep(50); } else if (Addr == 0xfd) { - ODM_delay_ms(5); + mdelay(5); } else if (Addr == 0xfc) { - ODM_delay_ms(1); + mdelay(1); } else if (Addr == 0xfb) { ODM_delay_us(50); } else if (Addr == 0xfa) { @@ -85,9 +85,9 @@ void odm_ConfigBB_PHY_REG_PG_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, if (Addr == 0xfe) { msleep(50); } else if (Addr == 0xfd) { - ODM_delay_ms(5); + mdelay(5); } else if (Addr == 0xfc) { - ODM_delay_ms(1); + mdelay(1); } else if (Addr == 0xfb) { ODM_delay_us(50); } else if (Addr == 0xfa) { @@ -107,9 +107,9 @@ void odm_ConfigBB_PHY_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 Bitmask if (Addr == 0xfe) { msleep(50); } else if (Addr == 0xfd) { - ODM_delay_ms(5); + mdelay(5); } else if (Addr == 0xfc) { - ODM_delay_ms(1); + mdelay(1); } else if (Addr == 0xfb) { ODM_delay_us(50); } else if (Addr == 0xfa) { diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl8188eu/hal/odm_interface.c index fa308114f06a..4510270a26c9 100644 --- a/drivers/staging/rtl8188eu/hal/odm_interface.c +++ b/drivers/staging/rtl8188eu/hal/odm_interface.c @@ -152,11 +152,6 @@ void ODM_StallExecution(u32 usDelay) rtw_udelay_os(usDelay); } -void ODM_delay_ms(u32 ms) -{ - rtw_mdelay_os(ms); -} - void ODM_delay_us(u32 us) { rtw_udelay_os(us); diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index 8be2ad7217d4..b409b6935b88 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -656,7 +656,7 @@ _func_enter_; DLBcnCount++; do { rtw_yield_os(); - /* rtw_mdelay_os(10); */ + /* mdelay(10); */ /* check rsvd page download OK. */ rtw_hal_get_hwreg(adapt, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid)); poll++; diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index b867bbb51885..b24ad495062c 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -1894,7 +1894,7 @@ _func_enter_; /* RQPN Load 0 */ rtw_write16(Adapter, REG_RQPN_NPQ, 0x0); rtw_write32(Adapter, REG_RQPN, 0x80000000); - rtw_mdelay_os(10); + mdelay(10); } } break; diff --git a/drivers/staging/rtl8188eu/include/odm_interface.h b/drivers/staging/rtl8188eu/include/odm_interface.h index 058546369a16..34ba46bc164e 100644 --- a/drivers/staging/rtl8188eu/include/odm_interface.h +++ b/drivers/staging/rtl8188eu/include/odm_interface.h @@ -137,8 +137,6 @@ void ODM_IsWorkItemScheduled(void *pRtWorkItem); /* ODM Timer relative API. */ void ODM_StallExecution(u32 usDelay); -void ODM_delay_ms(u32 ms); - void ODM_delay_us(u32 us); void ODM_sleep_us(u32 us); diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index a4ba79ad2d52..a97486ecf29e 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -279,7 +279,6 @@ void rtw_usleep_os(int us); u32 rtw_atoi(u8 *s); -void rtw_mdelay_os(int ms); void rtw_udelay_os(int us); void rtw_yield_os(void); diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index bf1cd69cd16d..985735b66f53 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -253,11 +253,6 @@ void rtw_usleep_os(int us) msleep((us/1000) + 1); } -void rtw_mdelay_os(int ms) -{ - mdelay((unsigned long)ms); -} - void rtw_udelay_os(int us) { udelay((unsigned long)us); -- 2.39.5