staging: r8188eu: remove hal_ops
authorMichael Straube <straube.linux@gmail.com>
Thu, 7 Oct 2021 10:39:42 +0000 (12:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Oct 2021 12:56:42 +0000 (14:56 +0200)
Remove the last pointer hal_deinit from struct hal_ops and call
rtl8188eu_hal_deinit() directly. Remove the now empty struct
hal_ops.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211007103943.8433-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/hal_intf.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/drv_types.h
drivers/staging/r8188eu/include/hal_intf.h

index 30ddf174e4dfaecaff3fab56d5d403ebcc075def..4e4f4d1c680d7988393430d86dea2897fccef3df 100644 (file)
@@ -31,7 +31,7 @@ uint rtw_hal_deinit(struct adapter *adapt)
 {
        uint    status = _SUCCESS;
 
-       status = adapt->HalFunc.hal_deinit(adapt);
+       status = rtl8188eu_hal_deinit(adapt);
 
        if (status == _SUCCESS)
                adapt->hw_init_completed = false;
index 2f0f2ff45795b246ba872adcb81b46d806917b1e..1110277d920e039ae3bcf991da9a8f3faeff3648 100644 (file)
@@ -938,7 +938,7 @@ static void CardDisableRTL8188EU(struct adapter *Adapter)
        Adapter->bFWReady = false;
 }
 
-static u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
+u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
 {
 
        DBG_88E("==> %s\n", __func__);
@@ -2093,12 +2093,8 @@ void rtl8188eu_init_default_value(struct adapter *adapt)
 
 void rtl8188eu_set_hal_ops(struct adapter *adapt)
 {
-       struct hal_ops  *halfunc = &adapt->HalFunc;
-
        adapt->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
        if (!adapt->HalData)
                DBG_88E("cant not alloc memory for HAL DATA\n");
        adapt->hal_data_sz = sizeof(struct hal_data_8188e);
-
-       halfunc->hal_deinit = &rtl8188eu_hal_deinit;
 }
index 3c972acf329c69a5bfbf0366b0bca1bdb3807722..edf86b6c254e2b2a8660f2e02661835cb704b4a2 100644 (file)
@@ -225,7 +225,6 @@ struct adapter {
 
        void *HalData;
        u32 hal_data_sz;
-       struct hal_ops  HalFunc;
 
        s32     bDriverStopped;
        s32     bSurpriseRemoved;
index 785aec3d3ea333de8940934ab4ee1d61ba40ec37..808707fd1e234ac8567dfefc56d63541a6174d3b 100644 (file)
@@ -104,10 +104,6 @@ enum hal_odm_variable {
 
 typedef s32 (*c2h_id_filter)(u8 id);
 
-struct hal_ops {
-       u32     (*hal_deinit)(struct adapter *padapter);
-};
-
 #define RF_CHANGE_BY_INIT      0
 #define RF_CHANGE_BY_IPS       BIT(28)
 #define RF_CHANGE_BY_PS                BIT(29)
@@ -156,6 +152,7 @@ uint rtw_hal_deinit(struct adapter *padapter);
 void rtw_hal_stop(struct adapter *padapter);
 
 u32 rtl8188eu_hal_init(struct adapter *Adapter);
+u32 rtl8188eu_hal_deinit(struct adapter *Adapter);
 
 void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
 void   rtw_hal_clone_data(struct adapter *dst_adapt,