rtlwifi: Clean rtl_evm_db_to_percentage a bit

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Priit Laes 2015-03-11 22:03:25 +02:00 committed by Kalle Valo
parent 387f149a2a
commit 54fb66d6fe

View File

@ -39,15 +39,8 @@ EXPORT_SYMBOL(rtl_query_rxpwrpercentage);
u8 rtl_evm_db_to_percentage(char value)
{
char ret_val;
ret_val = value;
char ret_val = clamp(-value, 0, 33) * 3;
if (ret_val >= 0)
ret_val = 0;
if (ret_val <= -33)
ret_val = -33;
ret_val = 0 - ret_val;
ret_val *= 3;
if (ret_val == 99)
ret_val = 100;