From patchwork Mon Nov 26 02:32:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 1799961 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 C5DAFDF264 for ; Mon, 26 Nov 2012 02:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753891Ab2KZCcW (ORCPT ); Sun, 25 Nov 2012 21:32:22 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:59301 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753344Ab2KZCcV (ORCPT ); Sun, 25 Nov 2012 21:32:21 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so3488559dak.19 for ; Sun, 25 Nov 2012 18:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:sender:message-id:from:to:cc:in-reply-to:references:from :subject:mime-version:content-type; bh=oqSPqeKLJ5cETOKowPPeAeH09U5MKklze4zDuXI7cJg=; b=PTdYr8PAmIC8ao6Mm2J60TUxJUZrU4ZbreGJts+PXZHCbTVKBflxyzH9Fyjel+5Q8q 2pynrpLP0qWpTsKv19sfchhBkJvQV+mqBOL9TNOAqUA1mo9QbmMaJdBbO/n9noJvQbH7 3ex6nV6Eae0EmXGyit043lPjfYaYfTxg8Qb6vyR9ftVQdlo0UwyH2it4PDuhuDng8krL hixzGEB9l8Ik503RrGdNtz737gHDfXewJKwOsf85C3koLWY+8SHIHYY4hf6lV5f3k3EE uBTQ8MA+ja2tvfLB3xv77RW5i5aIQapBYvSYv6HloB/SnXhCYR18o7CNnFHpt9yThIsr iu+g== Received: by 10.68.137.167 with SMTP id qj7mr32827018pbb.148.1353897141066; Sun, 25 Nov 2012 18:32:21 -0800 (PST) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id f2sm7870162paz.25.2012.11.25.18.32.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Nov 2012 18:32:20 -0800 (PST) Date: Sun, 25 Nov 2012 18:32:20 -0800 (PST) Message-ID: <87fw3xw0um.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Zhang Rui Cc: Simon , Magnus , linux-pm@vger.kernel.org, Kuninori Morimoto In-Reply-To: <87ip8tw0x1.wl%kuninori.morimoto.gx@renesas.com> References: <87sj82uo7o.wl%kuninori.morimoto.gx@renesas.com> <87pq36uo5v.wl%kuninori.morimoto.gx@renesas.com> <1353652189.2111.7.camel@rzhang1-mobl4> <87k3t9w39m.wl%kuninori.morimoto.gx@renesas.com> <1353894734.2299.16.camel@rzhang1-mobl4> <87ip8tw0x1.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/3] thermal: rcar: add rcar_zone_to_priv() macro MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This patch adds rcar_zone_to_priv() which is a helper macro for gettign private data. Signed-off-by: Kuninori Morimoto --- drivers/thermal/rcar_thermal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index f2678ff..90db951 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -44,6 +44,7 @@ struct rcar_thermal_priv { }; #define MCELSIUS(temp) ((temp) * 1000) +#define rcar_zone_to_priv(zone) (zone->devdata) /* * basic functions @@ -98,7 +99,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 */