/* Helper functions Do linear interpolation between two given (x, y) points  */
static s16 ath5k_get_interpolated_value(s16 target, s16 x_left, s16 x_right, s16 y_left, s16 y_right)
/* Helper functions Do linear interpolation between two given (x, y) points  */
static s16 ath5k_get_interpolated_value(s16 target, s16 x_left, s16 x_right, s16 y_left, s16 y_right)
{
	s16 ratio, result;
	if ((x_left == x_right) || (y_left == y_right))
		return y_left;
	ratio = ((100 * y_right - 100 * y_left)/(x_right - x_left));
	result = y_left + (ratio * (target - x_left) / 100);
	return result;
}