hikey960: fix the calculation in boardid

Since the type of ADC value is always unsigned int, don't
need to check the value with negative value.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
This commit is contained in:
Haojian Zhuang 2017-06-12 22:20:38 +08:00
parent 101afa02b7
commit 8aa928accf
1 changed files with 1 additions and 3 deletions

View File

@ -111,9 +111,7 @@ static int adcin_data_remap(unsigned int adcin_value)
{
int ret;
if (adcin_value < HKADC_DATA_GRADE0)
ret = BOARDID_UNKNOWN;
else if (adcin_value < HKADC_DATA_GRADE1)
if (adcin_value < HKADC_DATA_GRADE1)
ret = BOARDID_VALUE0;
else if (adcin_value < HKADC_DATA_GRADE2)
ret = BOARDID_VALUE1;