/* Description : get temperature range index from temperature table, if temperature match TBL <= temperature < TBL condition, then temp range index = id Input : temperature  */
static __s32 get_temp_range_index(int temperature)
/* Description : get temperature range index from temperature table, if temperature match TBL <= temperature < TBL condition, then temp range index = id Input : temperature  */
static __s32 get_temp_range_index(int temperature)
{
    __s32 index = -EINVAL;
    for (index = 0; index < C_TEMP_TBL_SIZE; index++) {
        if ((g_waveform_file.wf_temp_area_tbl[index] == 0) &&
                                (index > 0))
            break;
        if (temperature < g_waveform_file.wf_temp_area_tbl[index])
            break;
    }
    if (index > 0)
        index -= 1;
    return index;
}