OSDN Git Service

staging: r8188eu: remove read_chip_version from hal_ops
authorMichael Straube <straube.linux@gmail.com>
Sat, 4 Sep 2021 12:40:30 +0000 (14:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:47 +0000 (08:49 +0200)
Remove read_chip_version from hal_ops and remove its wrapper
rtw_hal_read_chip_version(). Call rtl8188e_read_chip_version()
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-4-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/include/rtl8188e_hal.h
drivers/staging/r8188eu/os_dep/usb_intf.c

index f58dd3d..1a59644 100644 (file)
@@ -6,12 +6,6 @@
 #include "../include/drv_types.h"
 #include "../include/hal_intf.h"
 
-void rtw_hal_read_chip_version(struct adapter *adapt)
-{
-       if (adapt->HalFunc.read_chip_version)
-               adapt->HalFunc.read_chip_version(adapt);
-}
-
 void rtw_hal_def_value_init(struct adapter *adapt)
 {
        if (adapt->HalFunc.init_default_value)
index 1adaf47..24bc8ba 100644 (file)
@@ -1730,7 +1730,7 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
        return ChipVersion;
 }
 
-static void rtl8188e_read_chip_version(struct adapter *padapter)
+void rtl8188e_read_chip_version(struct adapter *padapter)
 {
        ReadChipVersion8188E(padapter);
 }
@@ -1798,8 +1798,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
        pHalFunc->dm_init = &rtl8188e_init_dm_priv;
        pHalFunc->dm_deinit = &rtl8188e_deinit_dm_priv;
 
-       pHalFunc->read_chip_version = &rtl8188e_read_chip_version;
-
        pHalFunc->set_bwmode_handler = &PHY_SetBWMode8188E;
        pHalFunc->set_channel_handler = &PHY_SwChnl8188E;
 
index 9845b6f..7046f4b 100644 (file)
@@ -148,7 +148,6 @@ struct hal_ops {
 
        void    (*dm_init)(struct adapter *padapter);
        void    (*dm_deinit)(struct adapter *padapter);
-       void    (*read_chip_version)(struct adapter *padapter);
 
        void    (*init_default_value)(struct adapter *padapter);
 
@@ -283,8 +282,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_version(struct adapter *padapter);
-
 u8 rtw_hal_set_def_var(struct adapter *padapter,
                       enum hal_def_variable eVariable, void *pValue);
 u8 rtw_hal_get_def_var(struct adapter *padapter,
index 103991b..5cd441e 100644 (file)
@@ -437,6 +437,8 @@ bool HalDetectPwrDownMode88E(struct adapter *Adapter);
 void Hal_InitChannelPlan(struct adapter *padapter);
 void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
 
+void rtl8188e_read_chip_version(struct adapter *padapter);
+
 void rtl8188e_clone_haldata(struct adapter *dst, struct adapter *src);
 void rtl8188e_start_thread(struct adapter *padapter);
 void rtl8188e_stop_thread(struct adapter *padapter);
index bf7ef56..b7129e8 100644 (file)
@@ -14,6 +14,7 @@
 #include "../include/usb_ops.h"
 #include "../include/usb_osintf.h"
 #include "../include/rtw_ioctl.h"
+#include "../include/rtl8188e_hal.h"
 
 int ui_pid[3] = {0, 0, 0};
 
@@ -599,7 +600,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
        rtw_init_io_priv(padapter, usb_set_intf_ops);
 
        /* step read_chip_version */
-       rtw_hal_read_chip_version(padapter);
+       rtl8188e_read_chip_version(padapter);
 
        /* step usb endpoint mapping */
        rtl8188eu_interface_configure(padapter);