[PATCH 08/15] staging: rtl8723bs: Remove function pointer dm_init

Philipp Hortmann posted 15 patches 1 month, 3 weeks ago
[PATCH 08/15] staging: rtl8723bs: Remove function pointer dm_init
Posted by Philipp Hortmann 1 month, 3 weeks ago
Remove function pointer dm_init and use rtl8723b_init_dm_priv directly to
increase readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 drivers/staging/rtl8723bs/hal/hal_intf.c          | 3 +--
 drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 --
 drivers/staging/rtl8723bs/include/hal_intf.h      | 1 -
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index de7dfaa69c66..760ba45de8f7 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -39,8 +39,7 @@ void rtw_hal_free_data(struct adapter *padapter)
 
 void rtw_hal_dm_init(struct adapter *padapter)
 {
-	if (padapter->HalFunc.dm_init)
-		padapter->HalFunc.dm_init(padapter);
+	rtl8723b_init_dm_priv(padapter);
 }
 
 void rtw_hal_dm_deinit(struct adapter *padapter)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 867021ed31bf..106f1124964a 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -1823,8 +1823,6 @@ static void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_l
 
 void rtl8723b_set_hal_ops(struct hal_ops *pHalFunc)
 {
-	pHalFunc->dm_init = &rtl8723b_init_dm_priv;
-
 	pHalFunc->read_chip_version = &rtl8723b_read_chip_version;
 
 	pHalFunc->UpdateRAMaskHandler = &UpdateHalRAMask8723B;
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h
index ced414f2368e..8b85baf5be92 100644
--- a/drivers/staging/rtl8723bs/include/hal_intf.h
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h
@@ -162,7 +162,6 @@ enum hal_intf_ps_func {
 typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
 
 struct hal_ops {
-	void (*dm_init)(struct adapter *padapter);
 	void (*dm_deinit)(struct adapter *padapter);
 	void (*read_chip_version)(struct adapter *padapter);
 
-- 
2.43.0