From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Badarkhe Date: Fri, 04 Dec 2015 06:33:13 +0000 Subject: Re: [PATCH 2/4] thermal: rcar: enable to use thermal-zone on DT Message-Id: List-Id: References: <871tb2hpn2.wl%kuninori.morimoto.gx@renesas.com> <87y4dagb0i.wl%kuninori.morimoto.gx@renesas.com> In-Reply-To: <87y4dagb0i.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kuninori Morimoto Cc: Simon , Zhang Rui , Eduardo Valentin , Magnus , linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, "linux-kernel@vger.kernel.org" Hi > +static int rcar_thermal_of_get_temp(void *data, int *temp) > +{ > + struct rcar_thermal_priv *priv = data; > + > + *temp = rcar_thermal_get_current_temp(priv); > + > + return 0; > +} > + > +static int rcar_thermal_get_temp(struct thermal_zone_device *zone, int *temp) > +{ > + struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); > + > + *temp = rcar_thermal_get_current_temp(priv); > + > return 0; > } > Above two function, always returns 0. Can it possible to handle error and log some messages. Regards Manish Badarkhe From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751937AbbLDGVR (ORCPT ); Fri, 4 Dec 2015 01:21:17 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:33274 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbbLDGVP (ORCPT ); Fri, 4 Dec 2015 01:21:15 -0500 MIME-Version: 1.0 In-Reply-To: <87y4dagb0i.wl%kuninori.morimoto.gx@renesas.com> References: <871tb2hpn2.wl%kuninori.morimoto.gx@renesas.com> <87y4dagb0i.wl%kuninori.morimoto.gx@renesas.com> Date: Fri, 4 Dec 2015 11:51:13 +0530 Message-ID: Subject: Re: [PATCH 2/4] thermal: rcar: enable to use thermal-zone on DT From: Manish Badarkhe To: Kuninori Morimoto Cc: Simon , Zhang Rui , Eduardo Valentin , Magnus , linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi > +static int rcar_thermal_of_get_temp(void *data, int *temp) > +{ > + struct rcar_thermal_priv *priv = data; > + > + *temp = rcar_thermal_get_current_temp(priv); > + > + return 0; > +} > + > +static int rcar_thermal_get_temp(struct thermal_zone_device *zone, int *temp) > +{ > + struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); > + > + *temp = rcar_thermal_get_current_temp(priv); > + > return 0; > } > Above two function, always returns 0. Can it possible to handle error and log some messages. Regards Manish Badarkhe