From patchwork Fri Mar 15 13:00:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 2276691 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9B5653FC8A for ; Fri, 15 Mar 2013 13:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754955Ab3CONKF (ORCPT ); Fri, 15 Mar 2013 09:10:05 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:50334 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754774Ab3CONKD (ORCPT ); Fri, 15 Mar 2013 09:10:03 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2FDA1GO019182; Fri, 15 Mar 2013 08:10:01 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2FDA0Om009388; Fri, 15 Mar 2013 08:10:01 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Fri, 15 Mar 2013 08:10:00 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2FDA0JR000462; Fri, 15 Mar 2013 08:10:00 -0500 Received: from localhost (h64-13.vpn.ti.com [172.24.64.13]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r2FD9vV10047; Fri, 15 Mar 2013 08:09:57 -0500 (CDT) From: Eduardo Valentin To: CC: , , , , Eduardo Valentin Subject: [PATCH 24/50] staging: omap-thermal: name temp_to_adc_conversion in a better way Date: Fri, 15 Mar 2013 09:00:12 -0400 Message-ID: <1363352438-15935-25-git-send-email-eduardo.valentin@ti.com> X-Mailer: git-send-email 1.7.7.1.488.ge8e1c In-Reply-To: <1363352438-15935-1-git-send-email-eduardo.valentin@ti.com> References: <1363352438-15935-1-git-send-email-eduardo.valentin@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 --- 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 8279cca..d5359e3 100644 --- a/drivers/staging/omap-thermal/omap-bandgap.c +++ b/drivers/staging/omap-thermal/omap-bandgap.c @@ -264,8 +264,9 @@ exit: 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; @@ -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 */ @@ -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; @@ -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;