Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758584Ab3EUBcB (ORCPT ); Mon, 20 May 2013 21:32:01 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:29937 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755853Ab3EUBb6 (ORCPT ); Mon, 20 May 2013 21:31:58 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee68d-b7f096d0000043fc-26-519ace8d9ea5 Content-transfer-encoding: 8BIT Message-id: <519ACE88.3090503@samsung.com> Date: Tue, 21 May 2013 10:31:52 +0900 From: jonghwa3.lee@samsung.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120411 Thunderbird/11.0.1 To: "Zhang, Rui" Cc: "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Eduardo Valentin , Amit Dinel Kachhap , MyungJoo Ham Subject: Re: [PATCH 2/3] Thermal: core: Modify temp_crit_show() to use proper callback function. References: <1368870656-1183-1-git-send-email-jonghwa3.lee@samsung.com> <744357E9AAD1214791ACBA4B0B9092630110240D@SHSMSX101.ccr.corp.intel.com> In-reply-to: <744357E9AAD1214791ACBA4B0B9092630110240D@SHSMSX101.ccr.corp.intel.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsWyRsSkRLf33KxAg/+72CyWPJjCaLFm/08m i8u75rBZfO49wmhxu3EFm8WTh31sDmwei/e8ZPK4c20Pm0ffllWMHsdvbGfy+LxJLoA1issm JTUnsyy1SN8ugSujeeM8toJZAhX/559ha2CcydvFyMkhIWAi0fd6KxuELSZx4d56IJuLQ0hg KaPEujPL2GCKdu7ZzA6RWMQo8brvEjNIgldAUOLH5HssXYwcHMwC8hJHLmWDhJkF1CUmzVvE DFH/klHixo4nUPVaEp/bZzOC2CwCqhJ3T/8Gi7MJyEm8bfoGFhcVCJO4OuE4C4gtIqAmce7f DyaQ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VRHi/NwOFeFMSK6tSi/Lji0pzUosPMSYDfTeRWUo0OR+YZvJK 4g2NTcyMLI3MDS2MjM1JE1YS5z3Qah0oJJCeWJKanZpakFoEs4WJg1OqgXG22tobkRfO7i+/ u1s5OvlqdkrTq9CLzkIdWwtFgnz27DWX1F9teFK/iPuaavqK8Ll+T97deNTqLlF796p/NW9L f0jt3cIiA0nT9BUlZ7+d9LgYPUd314MeuTm7H/ZnurwWS32923B9WsBfPgt7Lqe4Fqe+myv7 TM7djz3opztFsuhZ7TXPXUosxRmJhlrMRcWJAHbDd0ApAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2254 Lines: 70 On 2013년 05월 21일 00:57, Zhang, Rui wrote: > > >> -----Original Message----- >> From: Jonghwa Lee [mailto:jonghwa3.lee@samsung.com] >> Sent: Saturday, May 18, 2013 5:51 PM >> To: linux-pm@vger.kernel.org >> Cc: linux-kernel@vger.kernel.org; Zhang, Rui; Eduardo Valentin; Amit >> Dinel Kachhap; Jonghwa Lee; MyungJoo Ham >> Subject: [PATCH 2/3] Thermal: core: Modify temp_crit_show() to use >> proper callback function. >> Importance: High >> >> This patch modifies temp_crit_show() which is used to create hwmon's >> sysfs node to use .get_crit_temp callback function of thermal zone >> device rather than .get_trip_temp. >> >> Signed-off-by: Jonghwa Lee >> Signed-off-by: MyungJoo Ham > > The problem is that .get_crit_temp is optional for thermal drivers > that has a critical trip point. Actually, this is a interface for hwmon not generic thermal framework. And when we create this node through the thermal_add_hwmon_sysfs(), we've already checked whether call back function is available. So the problem won't happen. Thanks Jonghwa > At least we do not have such kind of check in thermal core. > Take rcar_thermal driver for example, > It supports critical trip point but it does not have .get_crit_type. > > So I'd like to see a fix in rcar thermal driver and thermal core > for this issue, together with this patch. > > Thanks, > rui >> --- >> drivers/thermal/thermal_core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/thermal/thermal_core.c >> b/drivers/thermal/thermal_core.c index f753f48..ce4384a 100644 >> --- a/drivers/thermal/thermal_core.c >> +++ b/drivers/thermal/thermal_core.c >> @@ -924,7 +924,7 @@ temp_crit_show(struct device *dev, struct >> device_attribute *attr, >> long temperature; >> int ret; >> >> - ret = tz->ops->get_trip_temp(tz, 0, &temperature); >> + ret = tz->ops->get_crit_temp(tz, &temperature); >> if (ret) >> return ret; >> >> -- >> 1.7.9.5 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/