linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
	martin@kaiser.cx, fmdefrancesco@gmail.com,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 24/40] staging: r8188eu: remove ReadEFuse from hal_ops
Date: Mon,  6 Sep 2021 20:24:22 +0200	[thread overview]
Message-ID: <20210906182438.5417-25-straube.linux@gmail.com> (raw)
In-Reply-To: <20210906182438.5417-1-straube.linux@gmail.com>

Remove ReadEFuse hal_ops and remove its wrapper efuse_ReadEFuse().
Call rtl8188e_ReadEFuse() directly instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
 drivers/staging/r8188eu/core/rtw_efuse.c        | 11 +++--------
 drivers/staging/r8188eu/hal/rtl8188e_hal_init.c |  7 +++----
 drivers/staging/r8188eu/include/hal_intf.h      |  5 +++--
 3 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 1aeddfa2f14d..faf6cefaa4f0 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -175,11 +175,6 @@ ReadEFuseByte(
 /* 					write addr must be after sec5. */
 /*  */
 
-static void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool pseudo)
-{
-	Adapter->HalFunc.ReadEFuse(Adapter, efuseType, _offset, _size_byte, pbuf, pseudo);
-}
-
 void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool pseudo
 	)
 {
@@ -450,7 +445,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 
 	rtl8188e_EfusePowerSwitch(padapter, false, true);
 
-	efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
+	rtl8188e_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
 
 	rtl8188e_EfusePowerSwitch(padapter, false, false);
 
@@ -468,7 +463,7 @@ u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 
 	rtl8188e_EfusePowerSwitch(padapter, false, true);
 
-	efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
+	rtl8188e_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
 
 	rtl8188e_EfusePowerSwitch(padapter, false, false);
 
@@ -745,7 +740,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,
 
 	EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
 
-	efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
+	rtl8188e_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
 
 	rtl8188e_EfusePowerSwitch(pAdapter, false, false);
 }
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index b5d0cd332165..eed32dd6ee28 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -912,9 +912,9 @@ static void ReadEFuse_Pseudo(struct adapter *Adapter, u8 efuseType, u16 _offset,
 	Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
 }
 
-static void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
-			       u16 _offset, u16 _size_byte, u8 *pbuf,
-			       bool bPseudoTest)
+void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
+			u16 _offset, u16 _size_byte, u8 *pbuf,
+			bool bPseudoTest)
 {
 	if (bPseudoTest)
 		ReadEFuse_Pseudo(Adapter, efuseType, _offset, _size_byte, pbuf, bPseudoTest);
@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
 	pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
 
 	/*  Efuse related function */
-	pHalFunc->ReadEFuse = &rtl8188e_ReadEFuse;
 	pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition;
 	pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
 	pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
diff --git a/drivers/staging/r8188eu/include/hal_intf.h b/drivers/staging/r8188eu/include/hal_intf.h
index 86456bac3a5a..e1bb1f30c7e9 100644
--- a/drivers/staging/r8188eu/include/hal_intf.h
+++ b/drivers/staging/r8188eu/include/hal_intf.h
@@ -177,8 +177,6 @@ struct hal_ops {
 			       enum rf_radio_path eRFPath, u32 RegAddr,
 			       u32 BitMask, u32 Data);
 
-	void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
-			  u16 _size_byte, u8 *pbuf, bool bPseudoTest);
 	void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
 					u8 type, void *pOut, bool bPseudoTest);
 	u16	(*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
@@ -220,6 +218,9 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter,
 u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
 
 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,
+			bool bPseudoTest);
 
 void	rtw_hal_free_data(struct adapter *padapter);
 uint rtw_hal_init(struct adapter *padapter);
-- 
2.33.0


  parent reply	other threads:[~2021-09-06 18:26 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 18:23 [PATCH 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube
2021-09-06 18:23 ` [PATCH 01/40] staging: r8188eu: remove InitSwLeds from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 02/40] staging: r8188eu: remove DeInitSwLeds " Michael Straube
2021-09-06 18:24 ` [PATCH 03/40] staging: r8188eu: remove dm_init " Michael Straube
2021-09-06 18:24 ` [PATCH 04/40] staging: r8188eu: remove dm_deinit " Michael Straube
2021-09-06 18:24 ` [PATCH 05/40] staging: r8188eu: remove SetHalODMVarHandler " Michael Straube
2021-09-06 18:24 ` [PATCH 06/40] staging: r8188eu: remove empty functions Michael Straube
2021-09-06 18:24 ` [PATCH 07/40] staging: r8188eu: remove unused function rtw_interface_ps_func() Michael Straube
2021-09-06 18:24 ` [PATCH 08/40] staging: r8188eu: remove interface_ps_func from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 09/40] staging: r8188eu: remove hal_dm_watchdog " Michael Straube
2021-09-06 18:24 ` [PATCH 10/40] staging: r8188eu: remove set_bwmode_handler " Michael Straube
2021-09-06 18:24 ` [PATCH 11/40] staging: r8188eu: remove set_channel_handler " Michael Straube
2021-09-06 18:24 ` [PATCH 12/40] staging: r8188eu: remove unused enum hal_intf_ps_func Michael Straube
2021-09-06 18:24 ` [PATCH 13/40] staging: r8188eu: remove Add_RateATid from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 14/40] staging: r8188eu: remove hal_power_on " Michael Straube
2021-09-06 18:24 ` [PATCH 15/40] staging: r8188eu: remove sreset_init_value " Michael Straube
2021-09-06 18:24 ` [PATCH 16/40] staging: r8188eu: remove sreset_reset_value " Michael Straube
2021-09-06 18:24 ` [PATCH 17/40] staging: r8188eu: remove silentreset " Michael Straube
2021-09-06 18:24 ` [PATCH 18/40] staging: r8188eu: remove sreset_xmit_status_check " Michael Straube
2021-09-06 18:24 ` [PATCH 19/40] staging: r8188eu: remove sreset_linked_status_check " Michael Straube
2021-09-06 18:24 ` [PATCH 20/40] staging: r8188eu: remove sreset_get_wifi_status " Michael Straube
2021-09-06 18:24 ` [PATCH 21/40] staging: r8188eu: remove EfusePowerSwitch " Michael Straube
2021-09-06 18:24 ` [PATCH 22/40] staging: r8188eu: rename hal_EfusePowerSwitch_RTL8188E() Michael Straube
2021-09-06 18:24 ` [PATCH 23/40] staging: r8188eu: remove wrapper Efuse_PowerSwitch() Michael Straube
2021-09-06 18:24 ` Michael Straube [this message]
2021-09-06 18:24 ` [PATCH 25/40] staging: r8188eu: remove EFUSEGetEfuseDefinition from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 26/40] staging: r8188eu: remove EfuseGetCurrentSize " Michael Straube
2021-09-06 18:24 ` [PATCH 27/40] staging: r8188eu: remove empty comments Michael Straube
2021-09-06 18:24 ` [PATCH 28/40] staging: r8188eu: remove Efuse_PgPacketRead from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 29/40] staging: r8188eu: remove Efuse_PgPacketWrite " Michael Straube
2021-09-06 18:24 ` [PATCH 30/40] staging: r8188eu: remove Efuse_WordEnableDataWrite " Michael Straube
2021-09-06 18:24 ` [PATCH 31/40] staging: r8188eu: remove useless assignment Michael Straube
2021-09-06 18:24 ` [PATCH 32/40] staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 33/40] staging: r8188eu: remove AntDivCompareHandler " Michael Straube
2021-09-06 18:24 ` [PATCH 34/40] staging: r8188eu: remove empty function rtl8188e_start_thread() Michael Straube
2021-09-06 18:24 ` [PATCH 35/40] staging: r8188eu: remove empty function rtl8188e_stop_thread() Michael Straube
2021-09-06 18:24 ` [PATCH 36/40] staging: r8188eu: remove hal_notch_filter from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 37/40] staging: r8188eu: remove free_hal_data " Michael Straube
2021-09-06 18:24 ` [PATCH 38/40] staging: r8188eu: remove unused function rtl8188e_clone_haldata() Michael Straube
2021-09-06 18:24 ` [PATCH 39/40] staging: r8188eu: remove SetBeaconRelatedRegistersHandler from hal_ops Michael Straube
2021-09-06 18:24 ` [PATCH 40/40] staging: r8188eu: remove UpdateHalRAMask8188EUsb " Michael Straube
2021-09-06 18:38 ` [PATCH 00/40] staging: r8188eu: remove function pointers from struct hal_ops Michael Straube

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210906182438.5417-25-straube.linux@gmail.com \
    --to=straube.linux@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@kaiser.cx \
    --cc=phil@philpotter.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).