From patchwork Thu Mar 19 17:44:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 452104 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9AE5314007F for ; Fri, 20 Mar 2015 04:47:31 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 7D1EA1A0D07 for ; Fri, 20 Mar 2015 04:47:31 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e06smtp16.uk.ibm.com (e06smtp16.uk.ibm.com [195.75.94.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3A3941A09E1 for ; Fri, 20 Mar 2015 04:44:58 +1100 (AEDT) Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Mar 2015 17:44:55 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 19 Mar 2015 17:44:52 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 28A231B08061; Thu, 19 Mar 2015 17:45:16 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2JHiqNf7078182; Thu, 19 Mar 2015 17:44:52 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2JHipeV009488; Thu, 19 Mar 2015 11:44:52 -0600 Received: from hermes.kaod.org (sig-9-83-165-236.evts.uk.ibm.com [9.83.165.236]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t2JHim9q009412; Thu, 19 Mar 2015 11:44:51 -0600 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: lm-sensors@lm-sensors.org Date: Thu, 19 Mar 2015 18:44:41 +0100 Message-Id: <1426787085-9004-2-git-send-email-clg@fr.ibm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1423117857-32759-1-git-send-email-clg@fr.ibm.com> References: <1423117857-32759-1-git-send-email-clg@fr.ibm.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15031917-0025-0000-0000-000004626D50 Cc: Jean Delvare , skiboot@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org, Guenter Roeck Subject: [Skiboot] [PATCH v2 1/5] hwmon: (ibmpowernv) replace AMBIENT_TEMP by TEMP X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Ambient is too restrictive as there can be other temperature channels : core, memory, etc. Signed-off-by: Cédric Le Goater --- drivers/hwmon/ibmpowernv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux.git/drivers/hwmon/ibmpowernv.c =================================================================== --- linux.git.orig/drivers/hwmon/ibmpowernv.c +++ linux.git/drivers/hwmon/ibmpowernv.c @@ -44,7 +44,7 @@ */ enum sensors { FAN, - AMBIENT_TEMP, + TEMP, POWER_SUPPLY, POWER_INPUT, MAX_SENSOR_TYPE, @@ -87,7 +87,7 @@ static ssize_t show_sensor(struct device return ret; /* Convert temperature to milli-degrees */ - if (sdata->type == AMBIENT_TEMP) + if (sdata->type == TEMP) x *= 1000; /* Convert power to micro-watts */ else if (sdata->type == POWER_INPUT) @@ -154,7 +154,7 @@ static int create_hwmon_attr_name(struct } else if (!strcmp(attr_suffix, DT_DATA_ATTR_SUFFIX)) { attr_name = "input"; } else if (!strcmp(attr_suffix, DT_THRESHOLD_ATTR_SUFFIX)) { - if (type == AMBIENT_TEMP) + if (type == TEMP) attr_name = "max"; else if (type == FAN) attr_name = "min";