Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363475
b: refs/heads/master
c: e16f072
h: refs/heads/master
i:
  363473: eb2752b
  363471: 3737497
v: v3
  • Loading branch information
Eduardo Valentin authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent f6e7660 commit b2ac18b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2577e937cb8a4cc6967c4af88546c5939c78dbc5
refs/heads/master: e16f072d5d65a8df53ba4693f1334c453bd303aa
11 changes: 6 additions & 5 deletions trunk/drivers/staging/omap-thermal/omap-bandgap.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,9 @@ int omap_bandgap_adc_to_mcelsius(struct omap_bandgap *bg_ptr, int id,
return ret;
}

static int temp_to_adc_conversion(long temp, struct omap_bandgap *bg_ptr, int i,
int *adc)
static
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;
const int *conv_table = bg_ptr->conf->conv_table;
Expand Down Expand Up @@ -330,7 +331,7 @@ int add_hyst(int adc_val, int hyst_val, struct omap_bandgap *bg_ptr, int i,

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 */
Expand Down Expand Up @@ -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)
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)
return ret;

Expand Down Expand Up @@ -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)
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)
return ret;

Expand Down

0 comments on commit b2ac18b

Please sign in to comment.