From patchwork Wed May 4 06:02:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9010441 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7FF019F1C1 for ; Wed, 4 May 2016 06:07:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2359202EC for ; Wed, 4 May 2016 06:07:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF5022027D for ; Wed, 4 May 2016 06:07:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757252AbcEDGDT (ORCPT ); Wed, 4 May 2016 02:03:19 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:35002 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757240AbcEDGDS (ORCPT ); Wed, 4 May 2016 02:03:18 -0400 Received: by mail-pf0-f181.google.com with SMTP id 77so20989533pfv.2; Tue, 03 May 2016 23:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3Yi8Yrr6QhnPZ0OGMXjZ7wktXqy+oNmohfUIfAZxcbI=; b=lfDN7VA6pbg1APR5s6Ne50VxircuHAsv5jtdINerp1ebwmL1jMApUHaSzA4DPZ61re 0cbnaEsZTZaDRjWkF1JTVtVpgGmxpdDbkH9n29l713lATzLG+euOs3IYT41FZlnINKI7 CTAOO+85ILueztTwwVyoU4dM+/UMPzuuj1O6InYzlkOYdPRAgxPKHFzCYqWtO/vCgheO m56+FbGU1rnCPPQ5SuQP3sW4Wlv8aLNsYVxiqk8hx3fk+0guq8gg1aaUVYMWNmwJeiAN 6hVGofFu+5eXqZUNjZ1TCIrPpOhV78fVq261SQ1yY2/ylYr3BMQNqWo3UQBXh/nQ0d6p zLXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3Yi8Yrr6QhnPZ0OGMXjZ7wktXqy+oNmohfUIfAZxcbI=; b=IakaHmq5Cn6ud8yucWbrDvYi4VRpP14QtYXvePu7o1YLrH5hU4fmMt1SB+67ybxVen StrtOICnJU7yVHCP1fw9zdVXhku1OQSoNLlcsd6ZLtKPaUt0F86I9060rpdjlVGj2DZr XhJ1/kd+RVFKRA7myY6kwEglqLHp3J4DpvOLFvwTrlrztQbc3LlNw6hSuIdKSg0aSWME FGttU7Npxj9k7USLQgFQYsWuIQ0q4fmgmULMDbTEwJ9O0U3wuRJHNaovGNQNu5bUgg9h T5q5Ib0GfPQkDGl9+qGpmajlhB5HWg+WKjT1JPH/WAxjiBh0Ng6hq2tYUlTv2Zc6OMeo OuAg== X-Gm-Message-State: AOPr4FVYGh2ta/fJgQzbVkb9zPCkbHM5UloHK5M8VHmXBlfKwpc+EPBfUVBrUTwV2hJv2g== X-Received: by 10.98.0.203 with SMTP id 194mr8988407pfa.126.1462341797430; Tue, 03 May 2016 23:03:17 -0700 (PDT) Received: from localhost ([2601:647:4203:c8e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id d184sm2652757pfc.27.2016.05.03.23.03.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 23:03:16 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCH 16/31] thermal: core: move to_thermal_zone() macro to header file Date: Tue, 3 May 2016 23:02:30 -0700 Message-Id: <1462341765-13268-17-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462341765-13268-1-git-send-email-edubezval@gmail.com> References: <1462341765-13268-1-git-send-email-edubezval@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simply making this macro available to other thermal core files. Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 3 --- drivers/thermal/thermal_core.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 93da7d9..8506d17 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -742,9 +742,6 @@ int thermal_build_list_of_policies(char *buf) /* sys I/F for thermal zone */ -#define to_thermal_zone(_dev) \ - container_of(_dev, struct thermal_zone_device, device) - static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf) { diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index b80847c..38d977f 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -54,6 +54,9 @@ struct thermal_instance { unsigned int weight; /* The weight of the cooling device */ }; +#define to_thermal_zone(_dev) \ + container_of(_dev, struct thermal_zone_device, device) + int thermal_register_governor(struct thermal_governor *); void thermal_unregister_governor(struct thermal_governor *); void thermal_zone_device_passive_update(struct thermal_zone_device *, int);