forked from Minki/linux
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:
parent
387f149a2a
commit
54fb66d6fe
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user