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

staging: r8188eu: remove free_hal_data from hal_ops



Remove free_hal_data from hal_ops and remove its wrapper
rtw_hal_free_data(). Call rtl8188e_free_hal_data() directly instead.

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210906190223.11396-38-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4e487b75
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_free_data(struct adapter *adapt)
{
	if (adapt->HalFunc.free_hal_data)
		adapt->HalFunc.free_hal_data(adapt);
}

uint	 rtw_hal_init(struct adapter *adapt)
{
	uint	status = _SUCCESS;
+1 −5
Original line number Diff line number Diff line
@@ -669,12 +669,10 @@ void rtl8188e_InitializeFirmwareVars(struct adapter *padapter)
	pHalData->LastHMEBoxNum = 0;
}

static void rtl8188e_free_hal_data(struct adapter *padapter)
void rtl8188e_free_hal_data(struct adapter *padapter)
{

	kfree(padapter->HalData);
	padapter->HalData = NULL;

}

/*  */
@@ -1760,8 +1758,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
}
void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
{
	pHalFunc->free_hal_data = &rtl8188e_free_hal_data;

	pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
	pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
	pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
+1 −4
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ struct hal_ops {
	u32	(*hal_init)(struct adapter *padapter);
	u32	(*hal_deinit)(struct adapter *padapter);

	void	(*free_hal_data)(struct adapter *padapter);

	u32	(*inirp_init)(struct adapter *padapter);
	u32	(*inirp_deinit)(struct adapter *padapter);

@@ -194,7 +192,7 @@ void rtl8188eu_init_default_value(struct adapter *adapt);
void rtl8188e_SetHalODMVar(struct adapter *Adapter,
			   enum hal_odm_variable eVariable, void *pValue1, bool bSet);
u32 rtl8188eu_InitPowerOn(struct adapter *adapt);

void rtl8188e_free_hal_data(struct adapter *padapter);
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState);
void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
			u16 _offset, u16 _size_byte, u8 *pbuf,
@@ -207,7 +205,6 @@ int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en

void hal_notch_filter_8188e(struct adapter *adapter, bool enable);

void	rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter);
uint rtw_hal_deinit(struct adapter *padapter);
void rtw_hal_stop(struct adapter *padapter);
+1 −1
Original line number Diff line number Diff line
@@ -946,7 +946,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)

	rtw_free_pwrctrl_priv(padapter);

	rtw_hal_free_data(padapter);
	rtl8188e_free_hal_data(padapter);

	/* free the old_pnetdev */
	if (padapter->rereg_nd_name_priv.old_pnetdev) {