[PATCH 5/5] staging: r8188eu: ps_flag is never set

Michael Straube
2022-04-04T08:22:08Z

The field ps_flag in struct pwrctrl_priv is never set. It stays at its
default value 0. Remove it and remove related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 --
drivers/staging/r8188eu/os_dep/os_intfs.c | 7 -------
2 files changed, 9 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
index 162792988910..1d7dba853c40 100644
--- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
@@ -70,8 +70,6 @@ struct pwrctrl_priv {
struct timer_list pwr_state_check_timer;
int pwr_state_check_interval;

- int ps_flag;
-
enum rt_rf_power_state rf_pwrstate;/* cur power state */
enum rt_rf_power_state change_rfpwrstate;

diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 5a9374957e3a..390d1cc0ecb0 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -625,12 +625,6 @@ int _netdev_open(struct net_device *pnetdev)
{
uint status;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
- struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
-
- if (pwrctrlpriv->ps_flag) {
- padapter->net_closed = false;
- goto netdev_open_normal_process;
- }

if (!padapter->bup) {
padapter->bDriverStopped = false;
@@ -674,7 +668,6 @@ int _netdev_open(struct net_device *pnetdev)

netdev_br_init(pnetdev);

-netdev_open_normal_process:
return 0;

netdev_open_error:
--
2.35.1