summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
diff options
context:
space:
mode:
authorVatika Harlalka <vatikaharlalka@gmail.com>2015-02-24 00:06:14 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-26 12:53:48 -0800
commitd5dd06ea01807a6d32af1eb53f10ff5e08532e29 (patch)
tree5a3412774084ae9c9c48e2e344ededa3342273f8 /drivers/staging/rtl8188eu
parent8e2c69b62d700a3d813ddc82fc9fe538460bc4a7 (diff)
Staging: rtl8188eu: Replace ternary operator with existing macro
Replace ternary operator with existing abs() macro to increase code readability. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r--drivers/staging/rtl8188eu/hal/phy.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index e1d192fade6b..175b87ef8889 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -577,9 +577,8 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
}
if (delta > 0 && dm_odm->RFCalibrateInfo.TxPowerTrackControl) {
- delta = thermal_val > hal_data->EEPROMThermalMeter ?
- (thermal_val - hal_data->EEPROMThermalMeter) :
- (hal_data->EEPROMThermalMeter - thermal_val);
+ delta = abs(hal_data->EEPROMThermalMeter - thermal_val);
+
/* calculate new OFDM / CCK offset */
if (thermal_val > hal_data->EEPROMThermalMeter)
j = 1;