From f4337aa31d67202f8d9db84ec43f2270b8878cd5 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Wed, 9 Apr 2014 23:21:19 +0200 Subject: [PATCH] staging: rtl8723au: Call do_div() directly and get rid of unnecessary wrapper functions Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 4 ++-- drivers/staging/rtl8723au/include/osdep_service.h | 4 ---- drivers/staging/rtl8723au/os_dep/osdep_service.c | 11 ----------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 8ea00ba851a2..0a86923e7def 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -3031,8 +3031,8 @@ void hw_var_set_correct_tsf(struct rtw_adapter *padapter) /* tsf = pmlmeext->TSFValue - ((u32)pmlmeext->TSFValue % (pmlmeinfo->bcn_interval*1024)) - 1024; us */ tsf = pmlmeext->TSFValue - - rtw_modular6423a(pmlmeext->TSFValue, - (pmlmeinfo->bcn_interval * 1024)) - 1024; /* us */ + do_div(pmlmeext->TSFValue, + (pmlmeinfo->bcn_interval * 1024)) - 1024; /* us */ if (((pmlmeinfo->state & 0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) { diff --git a/drivers/staging/rtl8723au/include/osdep_service.h b/drivers/staging/rtl8723au/include/osdep_service.h index 6b7d7aa464fd..92c954eb2179 100644 --- a/drivers/staging/rtl8723au/include/osdep_service.h +++ b/drivers/staging/rtl8723au/include/osdep_service.h @@ -162,10 +162,6 @@ void rtw_unlock_suspend(void); #define FUNC_ADPT_FMT "%s(%s)" #define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name -u64 rtw_modular6423a(u64 x, u64 y); -u64 rtw_division6423a(u64 x, u64 y); - - /* Macros for handling unaligned memory accesses */ #define RTW_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \ diff --git a/drivers/staging/rtl8723au/os_dep/osdep_service.c b/drivers/staging/rtl8723au/os_dep/osdep_service.c index 97fc27dce19c..b89e779fa045 100644 --- a/drivers/staging/rtl8723au/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723au/os_dep/osdep_service.c @@ -71,17 +71,6 @@ u32 _rtw_queue_empty23a(struct rtw_queue *pqueue) return false; } -u64 rtw_modular6423a(u64 x, u64 y) -{ - return do_div(x, y); -} - -u64 rtw_division6423a(u64 x, u64 y) -{ - do_div(x, y); - return x; -} - /* rtw_cbuf_full23a - test if cbuf is full * @cbuf: pointer of struct rtw_cbuf * -- 2.30.2