[PATCH 18/61] staging: rtl8723bs: replace rtw_dm_in_lps_hdl with direct hal call

From: Arsenii Pashchenko

Date: Wed Jul 15 2026 - 08:56:33 EST


Remove the redundant rtw_dm_in_lps_hdl() wrapper function from
rtw_cmd.c and replace its call sites with direct calls to
rtw_hal_set_hwreg().

The wrapper provided no additional abstraction or logic, serving only
to pass fixed parameters (HW_VAR_DM_IN_LPS, NULL) to the underlying
HAL function. Removing it eliminates unnecessary overhead and cleans
up the driver interface.

Clean up the function definition, remove its prototype from the header
file, and update all invocations across the driver.

Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 02b7d24c3..88ac64a6b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1354,10 +1354,6 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
return res;
}

-static void rtw_dm_in_lps_hdl(struct adapter *padapter)
-{
- rtw_hal_set_hwreg(padapter, HW_VAR_DM_IN_LPS, NULL);
-}

u8 rtw_dm_in_lps_wk_cmd(struct adapter *padapter)
{
@@ -1753,7 +1749,7 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf)
lps_ctrl_wk_hdl(padapter, (u8)pdrvextra_cmd->type);
break;
case DM_IN_LPS_WK_CID:
- rtw_dm_in_lps_hdl(padapter);
+ rtw_hal_set_hwreg(padapter, HW_VAR_DM_IN_LPS, NULL);
break;
case LPS_CHANGE_DTIM_CID:
rtw_lps_change_dtim_hdl(padapter, (u8)pdrvextra_cmd->type);
--
2.55.0