From patchwork Fri Feb 6 16:59:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 5793691 X-Patchwork-Delegate: eduardo.valentin@ti.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 202CB9F336 for ; Fri, 6 Feb 2015 17:02:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D3EC20122 for ; Fri, 6 Feb 2015 17:02:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62334200ED for ; Fri, 6 Feb 2015 17:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758232AbbBFQ7c (ORCPT ); Fri, 6 Feb 2015 11:59:32 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:36302 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758201AbbBFQ73 (ORCPT ); Fri, 6 Feb 2015 11:59:29 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NJD008N30J3PT80@mailout2.samsung.com>; Sat, 07 Feb 2015 01:59:27 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-86-54d4f2ef9470 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 4C.51.20081.FE2F4D45; Sat, 07 Feb 2015 01:59:27 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NJD004390IME190@mmp1.samsung.com>; Sat, 07 Feb 2015 01:59:27 +0900 (KST) From: Lukasz Majewski To: Eduardo Valentin , Kamil Debski , Jean Delvare , Guenter Roeck , Kukjin Kim Cc: lm-sensors@lm-sensors.org, Linux PM list , "linux-samsung-soc@vger.kernel.org" , devicetree@vger.kernel.org, Lukasz Majewski , Kukjin Kim , linux-kernel@vger.kernel.org, Sjoerd Simons , Abhilash Kesavan , Abhilash Kesavan , Lukasz Majewski Subject: [PATCH v3 1/8] thermal: Provide stub for thermal_of_cooling_device_register() function Date: Fri, 06 Feb 2015 17:59:01 +0100 Message-id: <1423241948-31981-2-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1423241948-31981-1-git-send-email-l.majewski@samsung.com> References: <1418897591-18332-1-git-send-email-l.majewski@samsung.com> <1423241948-31981-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsVy+t9jAd33n66EGCyfK2rxeM1iJov5R86x Wsy/co3VYundT2wWP15fYLNY81fJonfBVTaL/sevmS3ePOK2ePNwM6PF5V1z2Cw+9x5htJhx fh+TxZOFZ5gs7kzby2Yx/fhbVgcBj7/Pr7N47Jx1l91j06pONo8HE3ezeayb9pbZY+f3BnaP vi2rGD02n672+LxJLoAzissmJTUnsyy1SN8ugStj1b7FrAWv+CtuHHnE1sC4hbeLkZNDQsBE 4tb7rcwQtpjEhXvr2boYuTiEBBYxSiw+voEdwulikui69pAJpIpNQE/i892nTCAJEYHtjBIr 5n0Da2EWuMYssW/zUbAqYYFEib9/nrOA2CwCqhIrnkxkB7F5BdwkHu9azgqxT1Gi+9kENhCb U8Bd4uC9XVDrmhklFu46wjSBkXcBI8MqRtHUguSC4qT0XEO94sTc4tK8dL3k/NxNjODAfia1 g3Flg8UhRgEORiUe3gTeKyFCrIllxZW5hxglOJiVRHh7lgKFeFMSK6tSi/Lji0pzUosPMUpz sCiJ8yrZt4UICaQnlqRmp6YWpBbBZJk4OKUaGHv0TJ8sV5ubOenCCQuVvntb/HvXblwnfm0b g3dr0QO+koPp0203pWb+9zLP1eazes94ZH1C+Hm3XesCPPz1l3pdOy0zsax3ss7PVCMXk7Qp tzfkLEyKfH+zOuPVyTN79jBfWyWcLOLYrap30sJ45mLPZfNul52WrTJbv2VGQPCq9TvKDRdN WazEUpyRaKjFXFScCADNqLYxaAIAAA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Odroid U3 fan can work without being registered as OF cooling device (with CONFIG_THERMAL_OF disabled). In this situation it can be controlled via PWM entry at /sys/class/hwmon/hwmon0/pwm1. Therefore, the thermal_of_cooling_device_register() function needs a stub to allow clean compilation. Signed-off-by: Lukasz Majewski --- Changes for v2: - None Changes for v3: - Provide stub declaration when CONFIG_THERMAL is not set --- include/linux/thermal.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index fc52e30..eacf2de 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -293,6 +293,20 @@ struct thermal_trip { }; /* Function declarations */ +#ifdef CONFIG_THERMAL +struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + char *type, void *devdata, + const struct thermal_cooling_device_ops *); +#else +static inline struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return NULL; +} +#endif #ifdef CONFIG_THERMAL_OF struct thermal_zone_device * thermal_zone_of_sensor_register(struct device *dev, int id, void *data, @@ -328,9 +342,6 @@ void thermal_zone_device_update(struct thermal_zone_device *); struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, const struct thermal_cooling_device_ops *); -struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, char *, void *, - const struct thermal_cooling_device_ops *); void thermal_cooling_device_unregister(struct thermal_cooling_device *); struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp);