From patchwork Tue Nov 8 05:08:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416467 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB6F260720 for ; Tue, 8 Nov 2016 05:11:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA8622876A for ; Tue, 8 Nov 2016 05:11:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD5AF28B87; Tue, 8 Nov 2016 05:11:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D590F2876A for ; Tue, 8 Nov 2016 05:11:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751062AbcKHFKk (ORCPT ); Tue, 8 Nov 2016 00:10:40 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34761 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932172AbcKHFKd (ORCPT ); Tue, 8 Nov 2016 00:10:33 -0500 Received: by mail-pf0-f196.google.com with SMTP id y68so18086727pfb.1; Mon, 07 Nov 2016 21:10:33 -0800 (PST) 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=3rqjVjndlYjTc+Cku9FwIkA8nhnZ30SyLOf+gcydp0Q=; b=scSZda7dIGD1RrFaw2xFkSPvxEn/v5XDiq4QLVaSdly4uwUaMpYrglPZ6u+jEQ0r8/ s00AD8E8BQhQL06Pv17tlZX1+FKnoNj/d+4wZiCesx0h+4o4ioyNREDtK/mZnsFGrAFK wGKa/oXhp0lbGhJYtqtNYk3U9j2ReUnfL5W5qpD2PTVfUd3YPksj2fSS/bGFs88pQFAu UQisz2VHKWN0v7AdxtHG5pWwd7i8ejWHYCvP8qeR+kAgZvdbxCDrEMvNbIp5Qr8QFMGX 4dd9iiRkqFt6QEtWN9YpxE7s8gS9kc9QfIpG4T0ZmMcSWW0tY1FtunVun3FhrSFS0pI7 PHCA== 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=3rqjVjndlYjTc+Cku9FwIkA8nhnZ30SyLOf+gcydp0Q=; b=YM7E5m/hsDcjJbFek/RAL5xnWBlb+vgq4s98IejpjWweY2PiZYXLI7sYRztbBRv57d Ot4yWSeSEseAkS0d5Ho5FBqEzR3AIKw65RO3CHnfmYl8y7B54l4jDfUHGg433q8JLyE6 n4wS+DKd5ML/0zw77DOs/KooDSWYSKTMgOeyzDiDsGD0HHh9Bp0WpygnHccg9DKJjfPG rCCkxu6sa5lU3CHX6VTHghThD3Ss/KxaoqEuPHfX2xCX6ow1E0rP3V+G2DnkH+R37zcb JHSBLBtIW9fB4dTlsbDtW/P7QJtXC4Mtnr5MJ5YZ1Si2P61r8IvEMWJGun/Tfz8j7OHV oYKA== X-Gm-Message-State: ABUngvfxmjGEKks2THu48bDUocXbFv1gEIpWYRfIK6Ey/zkQMoBrQR9TkYNSPkTlUcjtdQ== X-Received: by 10.99.188.1 with SMTP id q1mr16204310pge.145.1478581827615; Mon, 07 Nov 2016 21:10:27 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id wg1sm9652110pab.46.2016.11.07.21.10.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:10:27 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 19/49] thermal: core: move to_thermal_zone() macro to header file Date: Mon, 7 Nov 2016 21:08:57 -0800 Message-Id: <1478581767-7009-20-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1478581767-7009-1-git-send-email-edubezval@gmail.com> References: <1478581767-7009-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-Virus-Scanned: ClamAV using ClamSMTP Simply making this macro available to other thermal core files. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org 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 3d51184..f5b519a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -800,9 +800,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 8994d2a..097abee 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_rebind_exception(struct thermal_zone_device *,