Remove function rtw_btcoex_LpsVal as all it does is call
hal_btcoex_LpsVal.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.li...@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c    | 7 +------
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c   | 8 ++++----
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c   | 2 +-
 drivers/staging/rtl8723bs/include/rtw_btcoex.h | 1 -
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c 
b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
index 4ff3a2742a50..d1da058fb4c9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
+++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
@@ -77,11 +77,6 @@ u8 rtw_btcoex_IsBtControlLps(struct adapter *padapter)
        return hal_btcoex_IsBtControlLps(padapter);
 }
 
-u8 rtw_btcoex_LpsVal(struct adapter *padapter)
-{
-       return hal_btcoex_LpsVal(padapter);
-}
-
 void rtw_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist)
 {
        hal_btcoex_SetBTCoexist(padapter, bBtExist);
@@ -151,7 +146,7 @@ void rtw_btcoex_LPS_Enter(struct adapter *padapter)
        pwrpriv = adapter_to_pwrctl(padapter);
 
        pwrpriv->bpower_saving = true;
-       lpsVal = rtw_btcoex_LpsVal(padapter);
+       lpsVal = hal_btcoex_LpsVal(padapter);
        rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lpsVal, "BTCOEX");
 }
 
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c 
b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 01bce255c8ca..09e064f1211b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -485,7 +485,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, 
u8 smart_ps, u8 bcn_a
                                && (rtw_btcoex_IsBtControlLps(padapter) == 
true)) {
                                u8 val8;
 
-                               val8 = rtw_btcoex_LpsVal(padapter);
+                               val8 = hal_btcoex_LpsVal(padapter);
                                if (val8 & BIT(4))
                                        pslv = PS_STATE_S2;
                        }
@@ -914,7 +914,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, 
u32 task)
                && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
                u8 val8;
 
-               val8 = rtw_btcoex_LpsVal(padapter);
+               val8 = hal_btcoex_LpsVal(padapter);
                if (val8 & BIT(4))
                        pslv = PS_STATE_S2;
        }
@@ -1055,7 +1055,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
                && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
                u8 val8;
 
-               val8 = rtw_btcoex_LpsVal(padapter);
+               val8 = hal_btcoex_LpsVal(padapter);
                if (val8 & BIT(4))
                        pslv = PS_STATE_S2;
        }
@@ -1097,7 +1097,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
                && (rtw_btcoex_IsBtControlLps(padapter) == true)) {
                u8 val8;
 
-               val8 = rtw_btcoex_LpsVal(padapter);
+               val8 = hal_btcoex_LpsVal(padapter);
                if (val8 & BIT(4))
                        pslv = PS_STATE_S2;
        }
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c 
b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
index 177261c79e94..87e85968d2e1 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c
@@ -1046,7 +1046,7 @@ void rtl8723b_set_FwPwrMode_cmd(struct adapter *padapter, 
u8 psmode)
        if (psmode > 0) {
                if (rtw_btcoex_IsBtControlLps(padapter) == true) {
                        PowerState = hal_btcoex_RpwmVal(padapter);
-                       byte5 = rtw_btcoex_LpsVal(padapter);
+                       byte5 = hal_btcoex_LpsVal(padapter);
 
                        if ((rlbm == 2) && (byte5 & BIT(4))) {
                                /*  Keep awake interval to 1 to prevent from */
diff --git a/drivers/staging/rtl8723bs/include/rtw_btcoex.h 
b/drivers/staging/rtl8723bs/include/rtw_btcoex.h
index db987a0cf951..903940cc0b16 100644
--- a/drivers/staging/rtl8723bs/include/rtw_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/rtw_btcoex.h
@@ -24,7 +24,6 @@ u8 rtw_btcoex_IsBtDisabled(struct adapter *);
 void rtw_btcoex_Handler(struct adapter *);
 s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *);
 u8 rtw_btcoex_IsBtControlLps(struct adapter *);
-u8 rtw_btcoex_LpsVal(struct adapter *);
 void rtw_btcoex_SetBTCoexist(struct adapter *, u8 bBtExist);
 void rtw_btcoex_SetChipType(struct adapter *, u8 chipType);
 void rtw_btcoex_SetPGAntNum(struct adapter *, u8 antNum);
-- 
2.19.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to