From 47d9c16183e3477687f254b01a9d3c5c38154639 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 4 Sep 2021 14:40:29 +0200 Subject: [PATCH] staging: r8188eu: remove read_adapter_info from hal_ops Remove read_adapter_info from hal_ops and remove its wrapper rtw_hal_read_chip_info(). Call ReadAdapterInfo8188EU() directly instead. Acked-by: Phillip Potter Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210904124033.14244-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/r8188eu/hal/hal_intf.c | 6 ------ drivers/staging/r8188eu/hal/usb_halinit.c | 3 +-- drivers/staging/r8188eu/include/hal_intf.h | 4 +--- drivers/staging/r8188eu/os_dep/usb_intf.c | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/hal/hal_intf.c b/drivers/staging/r8188eu/hal/hal_intf.c index f52c77279f3dc..f58dd3da6c135 100644 --- a/drivers/staging/r8188eu/hal/hal_intf.c +++ b/drivers/staging/r8188eu/hal/hal_intf.c @@ -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) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index df1887bf29eb5..d34d26de69d9e 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -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; diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h index 6740a6570e6ab..9845b6f7378ed 100644 --- a/drivers/staging/r8188eu/include/hal_intf.h +++ b/drivers/staging/r8188eu/include/hal_intf.h @@ -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, diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index d4765205ae260..bf7ef56d12e39 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -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) -- 2.30.2