OSDN Git Service

staging: r8188eu: remove read_adapter_info from hal_ops
authorMichael Straube <straube.linux@gmail.com>
Sat, 4 Sep 2021 12:40:29 +0000 (14:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:47 +0000 (08:49 +0200)
Remove read_adapter_info from hal_ops and remove its wrapper
rtw_hal_read_chip_info(). Call ReadAdapterInfo8188EU() directly
instead.

Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210904124033.14244-3-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/hal_intf.h
drivers/staging/r8188eu/os_dep/usb_intf.c

index f52c772..f58dd3d 100644 (file)
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_read_chip_info(struct adapter *adapt)
-{
-       if (adapt->HalFunc.read_adapter_info)
-               adapt->HalFunc.read_adapter_info(adapt);
-}
-
 void rtw_hal_read_chip_version(struct adapter *adapt)
 {
        if (adapt->HalFunc.read_chip_version)
index df1887b..d34d26d 100644 (file)
@@ -1215,7 +1215,7 @@ static int _ReadAdapterInfo8188EU(struct adapter *Adapter)
        return _SUCCESS;
 }
 
-static void ReadAdapterInfo8188EU(struct adapter *Adapter)
+void ReadAdapterInfo8188EU(struct adapter *Adapter)
 {
        /*  Read EEPROM size before call any EEPROM function */
        Adapter->EepromAddressSize = GetEEPROMSize8188E(Adapter);
@@ -2250,7 +2250,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
        halfunc->DeInitSwLeds = &rtl8188eu_DeInitSwLeds;
 
        halfunc->init_default_value = &rtl8188eu_init_default_value;
-       halfunc->read_adapter_info = &ReadAdapterInfo8188EU;
 
        halfunc->SetHwRegHandler = &SetHwReg8188EU;
        halfunc->GetHwRegHandler = &GetHwReg8188EU;
index 6740a65..9845b6f 100644 (file)
@@ -152,8 +152,6 @@ struct hal_ops {
 
        void    (*init_default_value)(struct adapter *padapter);
 
-       void    (*read_adapter_info)(struct adapter *padapter);
-
        void    (*enable_interrupt)(struct adapter *padapter);
        void    (*disable_interrupt)(struct adapter *padapter);
        s32     (*interrupt_handler)(struct adapter *padapter);
@@ -267,6 +265,7 @@ struct hal_ops {
 void rtl8188eu_set_hal_ops(struct adapter *padapter);
 
 void rtl8188eu_interface_configure(struct adapter *adapt);
+void ReadAdapterInfo8188EU(struct adapter *Adapter);
 
 void rtw_hal_def_value_init(struct adapter *padapter);
 
@@ -284,7 +283,6 @@ void rtw_hal_stop(struct adapter *padapter);
 void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 
-void rtw_hal_read_chip_info(struct adapter *padapter);
 void rtw_hal_read_chip_version(struct adapter *padapter);
 
 u8 rtw_hal_set_def_var(struct adapter *padapter,
index d476520..bf7ef56 100644 (file)
@@ -605,7 +605,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
        rtl8188eu_interface_configure(padapter);
 
        /* step read efuse/eeprom data and get mac_addr */
-       rtw_hal_read_chip_info(padapter);
+       ReadAdapterInfo8188EU(padapter);
 
        /* step 5. */
        if (rtw_init_drv_sw(padapter) == _FAIL)