[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a6c87ca6b746392517275eb4f6837c0ccaabff1.1730619982.git.philipp.g.hortmann@gmail.com>
Date: Sun, 3 Nov 2024 09:14:31 +0100
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Philipp Hortmann <philipp.g.hortmann@...il.com>
Subject: [PATCH 10/13] staging: rtl8723bs: Remove function pointer SetHalDefVarHandler
Remove function pointer SetHalDefVarHandler and use SetHalDefVar8723BSDIO
directly to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com>
---
drivers/staging/rtl8723bs/hal/hal_intf.c | 4 +---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 5 +----
drivers/staging/rtl8723bs/include/hal_intf.h | 3 +--
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index e8b31b80917e..d45dfa8e638e 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -123,9 +123,7 @@ void rtw_hal_set_hwreg_with_buf(struct adapter *padapter, u8 variable, u8 *pbuf,
u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue)
{
- if (padapter->HalFunc.SetHalDefVarHandler)
- return padapter->HalFunc.SetHalDefVarHandler(padapter, eVariable, pValue);
- return _FAIL;
+ return SetHalDefVar8723BSDIO(padapter, eVariable, pValue);
}
u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index b1b40f6077fe..ccf1e9727846 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1247,8 +1247,7 @@ u8 GetHalDefVar8723BSDIO(
/* Description: */
/* Change default setting of specified variable. */
/* */
-static u8 SetHalDefVar8723BSDIO(struct adapter *Adapter,
- enum hal_def_variable eVariable, void *pValue)
+u8 SetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue)
{
return SetHalDefVar8723B(Adapter, eVariable, pValue);
}
@@ -1259,8 +1258,6 @@ void rtl8723bs_set_hal_ops(struct adapter *padapter)
rtl8723b_set_hal_ops(pHalFunc);
- pHalFunc->SetHalDefVarHandler = &SetHalDefVar8723BSDIO;
-
pHalFunc->hal_xmit = &rtl8723bs_hal_xmit;
pHalFunc->mgnt_xmit = &rtl8723bs_mgnt_xmit;
pHalFunc->hal_xmitframe_enqueue = &rtl8723bs_hal_xmitframe_enqueue;
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h
index 19aae9b0d400..b69d201b6826 100644
--- a/drivers/staging/rtl8723bs/include/hal_intf.h
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h
@@ -170,8 +170,6 @@ struct hal_ops {
void (*hal_dm_watchdog)(struct adapter *padapter);
void (*hal_dm_watchdog_in_lps)(struct adapter *padapter);
- u8 (*SetHalDefVarHandler)(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue);
-
void (*SetHalODMVarHandler)(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);
void (*UpdateRAMaskHandler)(struct adapter *padapter, u32 mac_id, u8 rssi_level);
@@ -316,4 +314,5 @@ void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val);
void GetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val);
void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf, int len);
u8 GetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue);
+u8 SetHalDefVar8723BSDIO(struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue);
#endif /* __HAL_INTF_H__ */
--
2.43.0
Powered by blists - more mailing lists