From patchwork Wed May 4 06:02:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9010401 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C4EB6BF29F for ; Wed, 4 May 2016 06:06:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E56412027D for ; Wed, 4 May 2016 06:06:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B6F3202EC for ; Wed, 4 May 2016 06:06:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757240AbcEDGDX (ORCPT ); Wed, 4 May 2016 02:03:23 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:33632 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757266AbcEDGDV (ORCPT ); Wed, 4 May 2016 02:03:21 -0400 Received: by mail-pa0-f50.google.com with SMTP id xk12so20287070pac.0; Tue, 03 May 2016 23:03:20 -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=2Wzix9UC49slfPUx7SH+EmCyxyphWEEgzM5Nfv4vwgA=; b=EcT99OVt3UzMbsMyvoDXviFl/0QmYL6NiR2pVTuXQP5JGERAPU9edvaKy3nDE3ZwPB 3z2B9lcLnRCLzN3pDhZGUtqghweHUM69AmU760mXJpCpWqJX8RnTFS+diPPkdHsu48uJ NhEUFyo6l4jbzSpu8GUIVLdQK+0PNycTeRYOuHAabGQUm43yrOneFafAcpNDOaGGg5kB TU5EzQAfWfhNXIgrXHGgK3GbTYJEuf3VvfYNMwbSgAtrvNGPaCrSfbCxnxYTJYWPdcli MilnNgMag5D0bKng4W6dhU/+ZLprOir4AVdi8zaiYoeGwLn3AYEq/A8V1QhMIKarmKEe +rWw== 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=2Wzix9UC49slfPUx7SH+EmCyxyphWEEgzM5Nfv4vwgA=; b=NK5nw61cji8Qch4UU4owtP3e5Gl0QDSMLZ3gQhYkCa6Ljnpp79cBgIxwW028FXc3nI +4IMSYXlgzviC2eA7leJdV03gnC3IiFk8LwOgitsdepSNOK5UfBcHq7PBZ2WKyHxv5BG o5l0wIQoLaw103Ph03JVJ4ZCrL6MFYjjj07DfHo427K3E5rSHWB0aeOukQKofi56+4Na 6RdD2qXQGsIbTfa+eoRPmHuwp1EhzTWLBMcb2Fdi5kooBMFafqVI36s2hcmeFJDIoikq LCONuGpTJv45fRVvyj7zJ0vqHp3MUmS2gpu/Sjmknyrml3kn9zYLbUtewv5K5A7ZOQk7 z97Q== X-Gm-Message-State: AOPr4FW1pqBTqO5XW0YNOPSzsZZW2yhXxBOchqaRpqc33pF5v0ymD8+79ZzpFcpK88S4EA== X-Received: by 10.66.78.73 with SMTP id z9mr9519002paw.4.1462341800509; Tue, 03 May 2016 23:03:20 -0700 (PDT) Received: from localhost ([2601:647:4203:c8e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id s23sm2616622pfj.86.2016.05.03.23.03.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 23:03:19 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCH 18/31] thermal: core: move to_cooling_device macro to header file Date: Tue, 3 May 2016 23:02:32 -0700 Message-Id: <1462341765-13268-19-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 Make the to_cooling_device() macro available across files in thermal core. 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 0e7ffc5..c866b0a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -741,9 +741,6 @@ int thermal_build_list_of_policies(char *buf) } /* sys I/F for cooling device */ -#define to_cooling_device(_dev) \ - container_of(_dev, struct thermal_cooling_device, device) - static ssize_t thermal_cooling_device_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 62889c2..727c87d 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -57,6 +57,9 @@ struct thermal_instance { #define to_thermal_zone(_dev) \ container_of(_dev, struct thermal_zone_device, device) +#define to_cooling_device(_dev) \ + container_of(_dev, struct thermal_cooling_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);