OSDN Git Service

staging: r8188eu: remove free_hal_data from hal_ops
authorMichael Straube <straube.linux@gmail.com>
Mon, 6 Sep 2021 19:02:20 +0000 (21:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:53 +0000 (08:49 +0200)
Remove free_hal_data from hal_ops and remove its wrapper
rtw_hal_free_data(). Call rtl8188e_free_hal_data() directly instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210906190223.11396-38-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/hal_intf.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/include/hal_intf.h
drivers/staging/r8188eu/os_dep/os_intfs.c

index 4394c68..17ac271 100644 (file)
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_free_data(struct adapter *adapt)
-{
-       if (adapt->HalFunc.free_hal_data)
-               adapt->HalFunc.free_hal_data(adapt);
-}
-
 uint    rtw_hal_init(struct adapter *adapt)
 {
        uint    status = _SUCCESS;
index 9a76e9a..22750cd 100644 (file)
@@ -669,12 +669,10 @@ void rtl8188e_InitializeFirmwareVars(struct adapter *padapter)
        pHalData->LastHMEBoxNum = 0;
 }
 
-static void rtl8188e_free_hal_data(struct adapter *padapter)
+void rtl8188e_free_hal_data(struct adapter *padapter)
 {
-
        kfree(padapter->HalData);
        padapter->HalData = NULL;
-
 }
 
 /*  */
@@ -1760,8 +1758,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
 }
 void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
 {
-       pHalFunc->free_hal_data = &rtl8188e_free_hal_data;
-
        pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
        pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
        pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
index 3520128..9b0a446 100644 (file)
@@ -127,8 +127,6 @@ struct hal_ops {
        u32     (*hal_init)(struct adapter *padapter);
        u32     (*hal_deinit)(struct adapter *padapter);
 
-       void    (*free_hal_data)(struct adapter *padapter);
-
        u32     (*inirp_init)(struct adapter *padapter);
        u32     (*inirp_deinit)(struct adapter *padapter);
 
@@ -194,7 +192,7 @@ void rtl8188eu_init_default_value(struct adapter *adapt);
 void rtl8188e_SetHalODMVar(struct adapter *Adapter,
                           enum hal_odm_variable eVariable, void *pValue1, bool bSet);
 u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
-
+void rtl8188e_free_hal_data(struct adapter *padapter);
 void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState);
 void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
                        u16 _offset, u16 _size_byte, u8 *pbuf,
@@ -207,7 +205,6 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en
 
 void hal_notch_filter_8188e(struct adapter *adapter, bool enable);
 
-void   rtw_hal_free_data(struct adapter *padapter);
 uint rtw_hal_init(struct adapter *padapter);
 uint rtw_hal_deinit(struct adapter *padapter);
 void rtw_hal_stop(struct adapter *padapter);
index 361d4b7..a1136c0 100644 (file)
@@ -946,7 +946,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
 
        rtw_free_pwrctrl_priv(padapter);
 
-       rtw_hal_free_data(padapter);
+       rtl8188e_free_hal_data(padapter);
 
        /* free the old_pnetdev */
        if (padapter->rereg_nd_name_priv.old_pnetdev) {