From patchwork Sun Nov 25 09:24:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 1799241 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 94E92DF264 for ; Sun, 25 Nov 2012 09:24:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752130Ab2KYJYy (ORCPT ); Sun, 25 Nov 2012 04:24:54 -0500 Received: from mga03.intel.com ([143.182.124.21]:64346 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923Ab2KYJYw (ORCPT ); Sun, 25 Nov 2012 04:24:52 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 25 Nov 2012 01:24:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,315,1352102400"; d="scan'208";a="221994087" Received: from unknown (HELO [10.255.21.143]) ([10.255.21.143]) by azsmga001.ch.intel.com with ESMTP; 25 Nov 2012 01:24:49 -0800 Message-ID: <1353835487.2176.6.camel@rzhang1-mobl4> Subject: Re: [PATCH 1/2] thermal: rcar: add rcar_zone_to_priv() macro From: Zhang Rui To: Kuninori Morimoto Cc: Simon , Magnus , linux-pm@vger.kernel.org Date: Sun, 25 Nov 2012 17:24:47 +0800 In-Reply-To: <87r4nmuo66.wl%kuninori.morimoto.gx@renesas.com> References: <87sj82uo7o.wl%kuninori.morimoto.gx@renesas.com> <87r4nmuo66.wl%kuninori.morimoto.gx@renesas.com> X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Wed, 2012-11-21 at 22:50 -0800, Kuninori Morimoto wrote: > This patch adds rcar_zone_to_priv() > which is a helper macro for gettign private data. > > Signed-off-by: Kuninori Morimoto Patch rebased on thermal next. From 5d251a94e56673b4fd22451c068a7a410cd6c687 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 21 Nov 2012 22:50:12 -0800 Subject: [PATCH] thermal: rcar: add rcar_zone_to_priv() macro This patch adds rcar_zone_to_priv() which is a helper macro for gettign private data. Signed-off-by: Kuninori Morimoto Signed-off-by: Zhang Rui --- drivers/thermal/rcar_thermal.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 81dce23..b8e6ffc 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -43,6 +43,8 @@ struct rcar_thermal_priv { u32 comp; }; +#define rcar_zone_to_priv(zone) (zone->devdata) + /* * basic functions */ @@ -96,7 +98,7 @@ static void rcar_thermal_bset(struct rcar_thermal_priv *priv, u32 reg, static int rcar_thermal_get_temp(struct thermal_zone_device *zone, unsigned long *temp) { - struct rcar_thermal_priv *priv = zone->devdata; + struct rcar_thermal_priv *priv = rcar_zone_to_priv(zone); int val, min, max, tmp; tmp = -200; /* default */