diff options
author | Eduardo Valentin <eduardo.valentin@ti.com> | 2013-03-15 09:00:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 12:02:11 -0400 |
commit | e16f072d5d65a8df53ba4693f1334c453bd303aa (patch) | |
tree | c88c4e228ad2037b18798c17e51c3180c18ea987 | |
parent | 2577e937cb8a4cc6967c4af88546c5939c78dbc5 (diff) |
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: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/omap-thermal/omap-bandgap.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index 8279cca0a616..d5359e367d8f 100644 --- a/drivers/staging/omap-thermal/omap-bandgap.c +++ b/drivers/staging/omap-thermal/omap-bandgap.c | |||
@@ -264,8 +264,9 @@ exit: | |||
264 | return ret; | 264 | return ret; |
265 | } | 265 | } |
266 | 266 | ||
267 | static int temp_to_adc_conversion(long temp, struct omap_bandgap *bg_ptr, int i, | 267 | static |
268 | int *adc) | 268 | int omap_bandgap_mcelsius_to_adc(struct omap_bandgap *bg_ptr, int i, long temp, |
269 | int *adc) | ||
269 | { | 270 | { |
270 | struct temp_sensor_data *ts_data = bg_ptr->conf->sensors[i].ts_data; | 271 | struct temp_sensor_data *ts_data = bg_ptr->conf->sensors[i].ts_data; |
271 | const int *conv_table = bg_ptr->conf->conv_table; | 272 | 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 | 331 | ||
331 | temp += hyst_val; | 332 | temp += hyst_val; |
332 | 333 | ||
333 | return temp_to_adc_conversion(temp, bg_ptr, i, sum); | 334 | return omap_bandgap_mcelsius_to_adc(bg_ptr, i, temp, sum); |
334 | } | 335 | } |
335 | 336 | ||
336 | /* Talert Thot threshold. Call it only if HAS(TALERT) is set */ | 337 | /* 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 | 494 | ||
494 | if (val < ts_data->min_temp + ts_data->hyst_val) | 495 | if (val < ts_data->min_temp + ts_data->hyst_val) |
495 | return -EINVAL; | 496 | return -EINVAL; |
496 | ret = temp_to_adc_conversion(val, bg_ptr, id, &t_hot); | 497 | ret = omap_bandgap_mcelsius_to_adc(bg_ptr, id, val, &t_hot); |
497 | if (ret < 0) | 498 | if (ret < 0) |
498 | return ret; | 499 | return ret; |
499 | 500 | ||
@@ -566,7 +567,7 @@ int omap_bandgap_write_tcold(struct omap_bandgap *bg_ptr, int id, int val) | |||
566 | if (val > ts_data->max_temp + ts_data->hyst_val) | 567 | if (val > ts_data->max_temp + ts_data->hyst_val) |
567 | return -EINVAL; | 568 | return -EINVAL; |
568 | 569 | ||
569 | ret = temp_to_adc_conversion(val, bg_ptr, id, &t_cold); | 570 | ret = omap_bandgap_mcelsius_to_adc(bg_ptr, id, val, &t_cold); |
570 | if (ret < 0) | 571 | if (ret < 0) |
571 | return ret; | 572 | return ret; |
572 | 573 | ||