mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
staging: ks7010: avoid if-else condition in ks_wlan_get_power
The if-else code in ks_wlan_get_power function is not needed at all and can be achieved with a simple boolean assignation. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f3b0bd2395
commit
1df964acca
1 changed files with 1 additions and 4 deletions
|
|
@ -1064,10 +1064,7 @@ static int ks_wlan_get_power(struct net_device *dev,
|
|||
if (priv->sleep_mode == SLP_SLEEP)
|
||||
return -EPERM;
|
||||
/* for SLEEP MODE */
|
||||
if (priv->reg.power_mgmt > 0)
|
||||
vwrq->power.disabled = 0;
|
||||
else
|
||||
vwrq->power.disabled = 1;
|
||||
vwrq->power.disabled = (priv->reg.power_mgmt <= 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue