Commit e16f072d authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Greg Kroah-Hartman

staging: omap-thermal: name temp_to_adc_conversion in a better way

Rename temp_to_adc_conversion to omap_bandgap_mcelsius_to_adc. This name,
though longer, describes better the function.

This patch also changes this function signature so the function follows
the style of this file.
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2577e937
...@@ -264,8 +264,9 @@ int omap_bandgap_adc_to_mcelsius(struct omap_bandgap *bg_ptr, int id, ...@@ -264,8 +264,9 @@ int omap_bandgap_adc_to_mcelsius(struct omap_bandgap *bg_ptr, int id,
return ret; return ret;
} }
static int temp_to_adc_conversion(long temp, struct omap_bandgap *bg_ptr, int i, static
int *adc) int omap_bandgap_mcelsius_to_adc(struct omap_bandgap *bg_ptr, int i, long temp,
int *adc)
{ {
struct temp_sensor_data *ts_data = bg_ptr->conf->sensors[i].ts_data; struct temp_sensor_data *ts_data = bg_ptr->conf->sensors[i].ts_data;
const int *conv_table = bg_ptr->conf->conv_table; const int *conv_table = bg_ptr->conf->conv_table;
...@@ -330,7 +331,7 @@ int add_hyst(int adc_val, int hyst_val, struct omap_bandgap *bg_ptr, int i, ...@@ -330,7 +331,7 @@ int add_hyst(int adc_val, int hyst_val, struct omap_bandgap *bg_ptr, int i,
temp += hyst_val; temp += hyst_val;
return temp_to_adc_conversion(temp, bg_ptr, i, sum); return omap_bandgap_mcelsius_to_adc(bg_ptr, i, temp, sum);
} }
/* Talert Thot threshold. Call it only if HAS(TALERT) is set */ /* Talert Thot threshold. Call it only if HAS(TALERT) is set */
...@@ -493,7 +494,7 @@ int omap_bandgap_write_thot(struct omap_bandgap *bg_ptr, int id, int val) ...@@ -493,7 +494,7 @@ int omap_bandgap_write_thot(struct omap_bandgap *bg_ptr, int id, int val)
if (val < ts_data->min_temp + ts_data->hyst_val) if (val < ts_data->min_temp + ts_data->hyst_val)
return -EINVAL; return -EINVAL;
ret = temp_to_adc_conversion(val, bg_ptr, id, &t_hot); ret = omap_bandgap_mcelsius_to_adc(bg_ptr, id, val, &t_hot);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -566,7 +567,7 @@ int omap_bandgap_write_tcold(struct omap_bandgap *bg_ptr, int id, int val) ...@@ -566,7 +567,7 @@ int omap_bandgap_write_tcold(struct omap_bandgap *bg_ptr, int id, int val)
if (val > ts_data->max_temp + ts_data->hyst_val) if (val > ts_data->max_temp + ts_data->hyst_val)
return -EINVAL; return -EINVAL;
ret = temp_to_adc_conversion(val, bg_ptr, id, &t_cold); ret = omap_bandgap_mcelsius_to_adc(bg_ptr, id, val, &t_cold);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment