mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 02:59:19 -04:00
staging: ks7010: change if-else condition assignment to use ternary operator
This commit changes an if-else block used to just assign a variable to use a ternary operator to do the same improving readability. 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
6cf070d231
commit
9dbeb16aab
@@ -673,10 +673,7 @@ static int ks_wlan_get_rate(struct net_device *dev,
|
||||
ks_wlan_update_phy_information(priv);
|
||||
|
||||
vwrq->value = ((priv->current_rate) & RATE_MASK) * 500000;
|
||||
if (priv->reg.tx_rate == TX_RATE_FIXED)
|
||||
vwrq->fixed = 1;
|
||||
else
|
||||
vwrq->fixed = 0;
|
||||
vwrq->fixed = (priv->reg.tx_rate == TX_RATE_FIXED) ? 1 : 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user