Commit 47d9c161 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

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: default avatarPhillip Potter <phil@philpotter.co.uk>
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210904124033.14244-3-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7d4b344b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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)
+1 −2
Original line number Diff line number Diff line
@@ -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;
+1 −3
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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)