Commit 54fb66d6 authored by Priit Laes's avatar Priit Laes Committed by Kalle Valo

rtlwifi: Clean rtl_evm_db_to_percentage a bit

Signed-off-by: default avatarPriit Laes <plaes@plaes.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 387f149a
......@@ -39,15 +39,8 @@ EXPORT_SYMBOL(rtl_query_rxpwrpercentage);
u8 rtl_evm_db_to_percentage(char value)
{
char ret_val;
ret_val = value;
if (ret_val >= 0)
ret_val = 0;
if (ret_val <= -33)
ret_val = -33;
ret_val = 0 - ret_val;
ret_val *= 3;
char ret_val = clamp(-value, 0, 33) * 3;
if (ret_val == 99)
ret_val = 100;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment