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:
parent
101afa02b7
commit
8aa928accf
|
@ -111,9 +111,7 @@ static int adcin_data_remap(unsigned int adcin_value)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (adcin_value < HKADC_DATA_GRADE0)
|
if (adcin_value < HKADC_DATA_GRADE1)
|
||||||
ret = BOARDID_UNKNOWN;
|
|
||||||
else if (adcin_value < HKADC_DATA_GRADE1)
|
|
||||||
ret = BOARDID_VALUE0;
|
ret = BOARDID_VALUE0;
|
||||||
else if (adcin_value < HKADC_DATA_GRADE2)
|
else if (adcin_value < HKADC_DATA_GRADE2)
|
||||||
ret = BOARDID_VALUE1;
|
ret = BOARDID_VALUE1;
|
||||||
|
|
Loading…
Reference in New Issue