aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/core
diff options
context:
space:
mode:
authorAastha Gupta <aastha.gupta4104@gmail.com>2017-10-08 10:24:51 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-18 16:07:49 +0200
commit95b3b4238581e72756505d601948f955e8baccf7 (patch)
tree12c7de20de9e4ebbf8449666e4823bd16f039324 /drivers/staging/rtl8723bs/core
parentstaging: rtl8723bs: Add space after ',' (diff)
downloadlinux-dev-95b3b4238581e72756505d601948f955e8baccf7.tar.xz
linux-dev-95b3b4238581e72756505d601948f955e8baccf7.zip
staging: rtl8723bs: remove ternary operators in assignmet statments
Remove unnecessary ternary operators in assignments statments. This patch is with the help of following Coccinelle script: @@ expression a, b, c; binary operator op = {==, !=, <=, >=, <, >, &&, ||}; @@ c = - (a op b) ? true : false + a op b Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/core')
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_pwrctrl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index 820a061506cc..4cd9798e262a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -1154,7 +1154,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
pwrctrlpriv->LpsIdleCount = 0;
pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/* PS_MODE_MIN; */
- pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?true:false;
+ pwrctrlpriv->bLeisurePs = pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
pwrctrlpriv->bFwCurrentInPSMode = false;
@@ -1325,7 +1325,8 @@ int rtw_pm_set_lps(struct adapter *padapter, u8 mode)
pwrctrlpriv->LpsIdleCount = 2;
pwrctrlpriv->power_mgnt = mode;
- pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?true:false;
+ pwrctrlpriv->bLeisurePs =
+ pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
}
} else
ret = -EINVAL;