[PATCH v2 1/2] staging: rtl8723bs: remove unused 'pwrdown' from struct hal_com_data

Nikolay Kulikov <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,dev.linux.lists.linux-staging
Message-ID <[email protected]>
This field is used only in the HalDetectPwrDownMode() functions. Replace
it with a direct return of a boolean value.

Signed-off-by: Nikolay Kulikov <[email protected]>
---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 +-------
 drivers/staging/rtl8723bs/include/hal_data.h | 3 ---
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 57d2925642e7..b9a7b03e2586 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -544,18 +544,12 @@ static void _RfPowerSave(struct adapter *padapter)
 static bool HalDetectPwrDownMode(struct adapter *Adapter)
 {
 	u8 tmpvalue;
-	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
 	struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(Adapter);
 
 	rtw_efuse_shadow_read(Adapter, 1, 0x7B/*EEPROM_RF_OPT3_92C*/, (u32 *)&tmpvalue);
 
 	/*  2010/08/25 MH INF priority > PDN Efuse value. */
-	if (tmpvalue & BIT(4) && pwrctrlpriv->reg_pdnmode)
-		pHalData->pwrdown = true;
-	else
-		pHalData->pwrdown = false;
-
-	return pHalData->pwrdown;
+	return (tmpvalue & BIT(4)) && pwrctrlpriv->reg_pdnmode;
 }	/*  HalDetectPwrDownMode */
 
 u32 rtl8723bs_hal_init(struct adapter *padapter)
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index f67ca496902a..57a18da67fc9 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -234,9 +234,6 @@ struct hal_com_data {
 
 	u8 u1ForcedIgiLb;			/*  forced IGI lower bound */
 
-	/*  2010/08/09 MH Add CU power down mode. */
-	bool		pwrdown;
-
 	u8 OutEpQueueSel;
 	u8 OutEpNumber;
 

-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.