From patchwork Mon May 30 21:27:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9142521 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 5E31260801 for ; Mon, 30 May 2016 21:34:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F8162793B for ; Mon, 30 May 2016 21:34:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44ABB281B4; Mon, 30 May 2016 21:34:35 +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 E2FA32819C for ; Mon, 30 May 2016 21:34:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423346AbcE3V2y (ORCPT ); Mon, 30 May 2016 17:28:54 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35944 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423276AbcE3V2w (ORCPT ); Mon, 30 May 2016 17:28:52 -0400 Received: by mail-pa0-f66.google.com with SMTP id fg1so22442747pad.3; Mon, 30 May 2016 14:28:52 -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=5xr1Iw2ZPrNM1LV/VMLP7PYKStIdQBVEJZBOlsPCj1Y=; b=0dK7tQuxVc4ED1DjCEE5wQNnzzBNLFyGpMe5t4Uj6BVAGdRIt9kIlxQn+tBzRntsXL 7yrVkBt9Q0BVouDrcMDIEz5C3wp7KSHjsQh5jMjTkLJX0Q8V2psPdgBNM+/ZkjTQmhbR ihyySe1a0McfLLpafdGp+wqIzbR9NaL53IEGoDdPwcagoEAVON9ENW5pvdK0veXbWr4z V0HrCDBu+MUBoN1Rn4wznhRJLhxahQTSd0N4Z7BHdJclyiDiClsiYzTT4vqNpQllqFwp rSROiBX0SUBZL4LYpb+w2AMh2kUjZ3ScW5JQ4VUPtDxtWeHGRt12wYQvZKSNuBYZf2qa ROcA== 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=5xr1Iw2ZPrNM1LV/VMLP7PYKStIdQBVEJZBOlsPCj1Y=; b=RnJUB2h5Lrh+So3A1m7u2GKXvEF6vtqDd+KLQAK12Hljxv/5hUfHlzZ6k+VjjaD91M VuHKVKGKVz7ZPLzFbRn9zgtvKepsedMUqHMCYPyQwVXPotwHDbJowxzIAkUWRmj/tbGB yfUuu5p5gY6zkR/5oWwW7mRe0TvrQ9XCejFm8CdeFbz24MuaksVpPWxFKNLv8qovYJTY uKv+P9PdGSvNQqHSRbsSy5sgaIF68NrcJ9EC++i+KhJTqvCZKC6RDuynevDaKTnAtKzl 5F+wjJtuyj0tRjp3KXgVbafBbXXNFJ1mRQDRwEUlczTILTycVziEqG/OQw9MBLdXRyRC jSXQ== X-Gm-Message-State: ALyK8tI1n1/sFcdNav2p3HHuhy/nEzNhGAVSFiAiZ/1JK8dRU9/YjmRzFGZ124u42cMUEQ== X-Received: by 10.67.22.129 with SMTP id hs1mr49790392pad.105.1464643731648; Mon, 30 May 2016 14:28:51 -0700 (PDT) Received: from localhost ([2601:b00:c501:3660:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id f193sm8819949pfc.16.2016.05.30.14.28.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 14:28:50 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCHv2 19/40] thermal: core: move to_thermal_zone() macro to header file Date: Mon, 30 May 2016 14:27:38 -0700 Message-Id: <1464643679-2733-20-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464643679-2733-1-git-send-email-edubezval@gmail.com> References: <1464643679-2733-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 d3f7124..cfa74e6 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -743,9 +743,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 *,