cpwm in struct pwrctrl_priv is never read. Remove it. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 5 ----- drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index daae91f82e97..2a0ee3aac700 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -204,8 +204,6 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) if ((padapter->bSurpriseRemoved) || (!padapter->hw_init_completed)) { - pwrpriv->cpwm = PS_STATE_S4; - return; } @@ -217,8 +215,6 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) pwrpriv->rpwm = pslv; pwrpriv->tog += 0x80; - pwrpriv->cpwm = pslv; - } static u8 PS_RDY_CHECK(struct adapter *padapter) @@ -423,7 +419,6 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) pwrctrlpriv->bFwCurrentInPSMode = false; pwrctrlpriv->rpwm = 0; - pwrctrlpriv->cpwm = PS_STATE_S4; pwrctrlpriv->pwr_mode = PS_MODE_ACTIVE; pwrctrlpriv->smart_ps = padapter->registrypriv.smart_ps; diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h index 6a0efb010d06..c5804a48072b 100644 --- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h @@ -152,8 +152,6 @@ enum { /* for ips_mode */ struct pwrctrl_priv { struct semaphore lock; volatile u8 rpwm; /* requested power state for fw */ - volatile u8 cpwm; /* fw current power state. updated when - * 1. read from HCPWM 2. driver lowers power level */ volatile u8 tog; /* toggling */ volatile u8 cpwm_tog; /* toggling */ -- 2.20.1