mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 17:26:42 +09: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:
committed by
Greg Kroah-Hartman
parent
f3b0bd2395
commit
1df964acca
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user