From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F5F638F92F for ; Wed, 22 Apr 2026 17:43:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776879804; cv=none; b=Z873ehnKTWSHdXL6ptvEWozYazLqICsCaqtw668XstPvFutJ1JJGUu8vmGsAA96a8a/0Vj4QEnegzWknzcoIu574hJu7qpNwpvnmfMVqYwL6yMa1ETd+tkAvKgjMl490bONxZ7/kqJYjfu/ZNUhAvqrDBsk1r/Vhw8LQmC6ySw0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776879804; c=relaxed/simple; bh=8CJ7eadvGl7GqKniVLLqEwYFaXzs263oYCNun34bBFU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q+XxTAu+2id3a3BOPfIiXvljkKf9SZCNzElrY8DetaRbUJ+EvB6ek9hF88/AuWWaWh+6QN+QMaNmixxLMieOqId0Eag8W1GWqwaHLvvMpku9vZg15KvSmyj11wqsWmnPZHkvvBx5YMa5ghbkWEb0a+jfqidFhaLTvVUqQHkDgPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=bHExX8TY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Fr9SS3qC; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="bHExX8TY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Fr9SS3qC" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63MGA8rE3174074 for ; Wed, 22 Apr 2026 17:43:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=pzqN02xmUOc iJ0Ac5IjOLUP8JJ7SGTjboIPlBRiCRas=; b=bHExX8TY9KGvxpewtk35G4YGTru Bq6uReObllkg5SsUPG+ejYdnC3LE5wvfGRO/G9FrrAS/vBhOGDBEQ2DWjgqHcl+M YqJw1DpakmPJBZzgCgBY3iTsaNrzrrjzuBDTIHR+9PZYMo/Vj7f1Oms98jCQY/nK 8YnW+FxKd9nAifxVVsqhMggWanDAybN+1VrORNLEw5J6XjLSxar7QbyQzOK6wu2o ZIMVSVzFZYEP3egzthJqDcBfRr90AuSTIYa8xU8Km8v4dUJ8lYsamFhBKwwx+SNX DDJ3dzKQxwrcBPDw7v4uIRbu/jKxC3zPoPm5bQGLWe2xoyqwAdJy/T2eDpw== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1m30an6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 22 Apr 2026 17:43:20 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-50b220c72bbso143468461cf.1 for ; Wed, 22 Apr 2026 10:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776879799; x=1777484599; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pzqN02xmUOciJ0Ac5IjOLUP8JJ7SGTjboIPlBRiCRas=; b=Fr9SS3qCEmeu7HV2xgZio0/obt6/5l6Iru9d8aRGyG7XXO4Yd1uguDC89thhnHfkwe JZ1IXDCVe4wdNbDQ6GotdfE3G7/1GCbTcaakllXhU7FWZOBPymAOQgZd/nh5Do8tTNzZ IxixZOl2f+IM5NQqgDYPfyXijyHfUMehRJfVMV9jcd/IcfYLlLiPdQShdH2tIaXDAXCn J59EwT9bGoIsOZxlo54a05i2k2B6vW1vE8XUnzvk1bbhK1rxYdlL6eQHIjGdWmumFLk1 Nw2CUCJy5bCh7K0Y9Ji2iBxq2M3Mabp5IABmIhZa4pMG5COXQSgnoKASljJVx+V7v+RY rWeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776879799; x=1777484599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pzqN02xmUOciJ0Ac5IjOLUP8JJ7SGTjboIPlBRiCRas=; b=qOiAtB4KRXQm+nylh9oRkKHvCksctMNRfITYjRjCJSPAtbViBLJGu422cX5S1InKzR 2SnEX8mZtmY83wVC8w9VRsBkkPz/I3tzwQqCCWveibvfnYjrQA0A85upcHe5YYI7PRTV o+NxPWF0WLrUB1ndEWk7jxeN2e2htSVadcnU0nqnXj+sgUtd5uM/1NSfc+1IIM+4TRnH 2DfgrGjoF00rM9VuMWwANGcBfCgGRz7rzMVqtsGce+So8jXYRlLyf+u2FhlbhcqiG8TV uR2H5yJ49F3KsDXtaenaNY3EXxXGmVdDwfzoGQh/PljnpMJRIlCVt1K4/2EEyJ8hxBxv bfug== X-Forwarded-Encrypted: i=1; AFNElJ909FpVWGDZ3sTbLZ2GADfVyBrnrzPcDlbLJetMJ27vpNL27NMR8LGelAh6Az5uyYlFhOqinQe7KZmIyhE=@vger.kernel.org X-Gm-Message-State: AOJu0YyLcG1uCAzFOq4ELPFxWKH7Qea+wKgh/ME6Ps1tbU76Hx5qU/Hx 0r3Mwy5Bj5H2FSfJmrHBb7UXhL/IrFrJteZ7Q+Vjr93SaffZeDuDP43KkL0thh+iUYW5N+Pr4m/ O+KoZCl9DFyXOwBWk49a15zBvbCc9a1fbXkW+H9mh+e1RO0ZD6jpgBZZfifd8PszbF00= X-Gm-Gg: AeBDietYVtSKqvp5LToz7xOWNK2+cpb8Ad+lcDTEch2M50SaDc3Ggp+E2Z+y926dKoh 9135AKmcTswjycrnLBriKtn8Qn4eXy8gGwsyGKwfXPuxlASH2URCoMWzqc+2SgDpAJaZAoVZCFF OsPtuTBX738s+412fxxLLyMU7kacwKt+MprvaLRv1y60M+TZ8rhhcHGdy9SxFYZ/wheg2QhzzXp 7r6R+gnkVIJ3b0pJskZgjs3VCKvyH5D3ID48Dc6eHdalM9xiGcLqIl3Mw5T8wiEmExgzQmLGPPm SGg7JYHNQPJiSHHp3ykGWs6AwzUYQdO7drKs5hmqAzTfni09rj5zGj2mTBFM6f6nUOswwcmzE3x GqdkLZK9WLkLhsNKAGKckNkXG0stWvV8X9v4CklhTC1BxNyGysaMwO7EG47oV X-Received: by 2002:ac8:7fd2:0:b0:509:1ffc:c538 with SMTP id d75a77b69052e-50e36b3f557mr342328631cf.19.1776879799314; Wed, 22 Apr 2026 10:43:19 -0700 (PDT) X-Received: by 2002:ac8:7fd2:0:b0:509:1ffc:c538 with SMTP id d75a77b69052e-50e36b3f557mr342327611cf.19.1776879798680; Wed, 22 Apr 2026 10:43:18 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:ae20:597c:99b8:d161]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb7a051dsm142511965e9.18.2026.04.22.10.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2026 10:43:17 -0700 (PDT) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@kernel.org Cc: gaurav.kohli@oss.qualcomm.com, Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Simona Vetter , Guenter Roeck , Joel Stanley , Andrew Jeffery , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Benson Leung , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Heiko Stuebner , Thierry Reding , Jonathan Hunter , Bjorn Andersson , Konrad Dybcio , Amit Daniel Kachhap , Viresh Kumar , Neil Armstrong , Amit Kucheria , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: [PATCH v2 02/12] thermal/of: Move OF code where it belongs to Date: Wed, 22 Apr 2026 19:42:51 +0200 Message-ID: <20260422174305.2899095-3-daniel.lezcano@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260422174305.2899095-1-daniel.lezcano@oss.qualcomm.com> References: <20260422174305.2899095-1-daniel.lezcano@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: R49tZ0Dp1U1SsyPf8_YVHYEKf52DxRuE X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIyMDE3MSBTYWx0ZWRfX1jGufm7UNfvN rIKlMe8tPlQ3KCy8p2Tj3CQdb4hg+55s0b6JPNmP4t3d5pOljVuv6CkFFF/q46t2M7WxiPL5xu3 bNNWpYmXHNrzvcfiw4eCO+Hl76qPbEo8KaNRXc9gfueKXEARJUqCugmqWTmMbmN5of6AcUKWtdA LOYRrXxQmt2qEnAehOFd5AXS3kpWs2VmAeTy4dIXuthTX1JiZa+f0m+ajrru4o19aqCmiv0rGU3 LTL5tC8NaH25eBkdsnWg1xXb+kBdySNDjMQT/TTjVxj0o7ZQY9yQU2WUhuA6fIgwbQMURTgLdIL w3zjOXRQgp7zp5Hs8Q/CoKBAm5fR08atgtK/SFVotru0pqM9WS3Q3bBJOBIRr+ov03o+mMXkJ1W eYE5LZ8NT6f/X4djQYsXeZpiTPDn1v7M2tRASfEZjkzY0C1qgDDiAB/28hCpMPxrMJQA2TRqR31 wa8l9bubEnbe1M4Jiww== X-Authority-Analysis: v=2.4 cv=PsOjqQM3 c=1 sm=1 tr=0 ts=69e908b8 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=gsbXGzNoRcIiw2hTtpUA:9 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-GUID: R49tZ0Dp1U1SsyPf8_YVHYEKf52DxRuE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-22_02,2026-04-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 bulkscore=0 malwarescore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604220171 The functions: - thermal_of_cooling_device_register() - devm_thermal_of_cooling_device_register() are related to thermal-of but they are implemented in thermal-core. Move these functions to the right file. As the thermal-of file depends on CONFIG_THERMAL_OF=y, by moving these two functions in it, when non-OF drivers are using this API that results in a link issue. In order to prevent unnecessary circumvolutions with the changes, the stubs have been added in the header file resulting in having the non-OF drivers compiled without the CONFIG_THERMAL_OF=y using these stubs and failing to register their cooling devices. This is temporary as the next changes introduces the functions for non-OF drivers and returning to the initial state. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 75 +--------------------------------- drivers/thermal/thermal_core.h | 5 +++ drivers/thermal/thermal_of.c | 72 ++++++++++++++++++++++++++++++++ include/linux/thermal.h | 47 ++++++++++++--------- 4 files changed, 105 insertions(+), 94 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 2f4e2dc46b8f..8a70768b46dd 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1056,7 +1056,7 @@ static void thermal_cooling_device_init_complete(struct thermal_cooling_device * * Return: a pointer to the created struct thermal_cooling_device or an * ERR_PTR. Caller must check return value with IS_ERR*() helpers. */ -static struct thermal_cooling_device * +struct thermal_cooling_device * __thermal_cooling_device_register(struct device_node *np, const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) @@ -1163,79 +1163,6 @@ thermal_cooling_device_register(const char *type, void *devdata, } EXPORT_SYMBOL_GPL(thermal_cooling_device_register); -/** - * thermal_of_cooling_device_register() - register an OF thermal cooling device - * @np: a pointer to a device tree node. - * @type: the thermal cooling device type. - * @devdata: device private data. - * @ops: standard thermal cooling devices callbacks. - * - * This function will register a cooling device with device tree node reference. - * This interface function adds a new thermal cooling device (fan/processor/...) - * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself - * to all the thermal zone devices registered at the same time. - * - * Return: a pointer to the created struct thermal_cooling_device or an - * ERR_PTR. Caller must check return value with IS_ERR*() helpers. - */ -struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops) -{ - return __thermal_cooling_device_register(np, type, devdata, ops); -} -EXPORT_SYMBOL_GPL(thermal_of_cooling_device_register); - -static void thermal_cooling_device_release(struct device *dev, void *res) -{ - thermal_cooling_device_unregister( - *(struct thermal_cooling_device **)res); -} - -/** - * devm_thermal_of_cooling_device_register() - register an OF thermal cooling - * device - * @dev: a valid struct device pointer of a sensor device. - * @np: a pointer to a device tree node. - * @type: the thermal cooling device type. - * @devdata: device private data. - * @ops: standard thermal cooling devices callbacks. - * - * This function will register a cooling device with device tree node reference. - * This interface function adds a new thermal cooling device (fan/processor/...) - * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself - * to all the thermal zone devices registered at the same time. - * - * Return: a pointer to the created struct thermal_cooling_device or an - * ERR_PTR. Caller must check return value with IS_ERR*() helpers. - */ -struct thermal_cooling_device * -devm_thermal_of_cooling_device_register(struct device *dev, - struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops) -{ - struct thermal_cooling_device **ptr, *tcd; - - ptr = devres_alloc(thermal_cooling_device_release, sizeof(*ptr), - GFP_KERNEL); - if (!ptr) - return ERR_PTR(-ENOMEM); - - tcd = __thermal_cooling_device_register(np, type, devdata, ops); - if (IS_ERR(tcd)) { - devres_free(ptr); - return tcd; - } - - *ptr = tcd; - devres_add(dev, ptr); - - return tcd; -} -EXPORT_SYMBOL_GPL(devm_thermal_of_cooling_device_register); - static bool thermal_cooling_device_present(struct thermal_cooling_device *cdev) { struct thermal_cooling_device *pos = NULL; diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index d3acff602f9c..bdd59947b24f 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -269,6 +269,11 @@ void thermal_zone_device_critical_shutdown(struct thermal_zone_device *tz); void thermal_governor_update_tz(struct thermal_zone_device *tz, enum thermal_notify_event reason); +struct thermal_cooling_device * +__thermal_cooling_device_register(struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops); + /* Helpers */ #define for_each_trip_desc(__tz, __td) \ for (__td = __tz->trips; __td - __tz->trips < __tz->num_trips; __td++) diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 99085c806a1f..398157e740fc 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -510,3 +510,75 @@ void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_dev devm_thermal_of_zone_match, tz)); } EXPORT_SYMBOL_GPL(devm_thermal_of_zone_unregister); + +/** + * thermal_of_cooling_device_register() - register an OF thermal cooling device + * @np: a pointer to a device tree node. + * @type: the thermal cooling device type. + * @devdata: device private data. + * @ops: standard thermal cooling devices callbacks. + * + * This function will register a cooling device with device tree node reference. + * This interface function adds a new thermal cooling device (fan/processor/...) + * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself + * to all the thermal zone devices registered at the same time. + * + * Return: a pointer to the created struct thermal_cooling_device or an + * ERR_PTR. Caller must check return value with IS_ERR*() helpers. + */ +struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return __thermal_cooling_device_register(np, type, devdata, ops); +} +EXPORT_SYMBOL_GPL(thermal_of_cooling_device_register); + +static void thermal_cooling_device_release(struct device *dev, void *res) +{ + thermal_cooling_device_unregister(*(struct thermal_cooling_device **)res); +} + +/** + * devm_thermal_of_cooling_device_register() - register an OF thermal cooling + * device + * @dev: a valid struct device pointer of a sensor device. + * @np: a pointer to a device tree node. + * @type: the thermal cooling device type. + * @devdata: device private data. + * @ops: standard thermal cooling devices callbacks. + * + * This function will register a cooling device with device tree node reference. + * This interface function adds a new thermal cooling device (fan/processor/...) + * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself + * to all the thermal zone devices registered at the same time. + * + * Return: a pointer to the created struct thermal_cooling_device or an + * ERR_PTR. Caller must check return value with IS_ERR*() helpers. + */ +struct thermal_cooling_device * +devm_thermal_of_cooling_device_register(struct device *dev, + struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + struct thermal_cooling_device **ptr, *tcd; + + ptr = devres_alloc(thermal_cooling_device_release, sizeof(*ptr), + GFP_KERNEL); + if (!ptr) + return ERR_PTR(-ENOMEM); + + tcd = __thermal_cooling_device_register(np, type, devdata, ops); + if (IS_ERR(tcd)) { + devres_free(ptr); + return tcd; + } + + *ptr = tcd; + devres_add(dev, ptr); + + return tcd; +} +EXPORT_SYMBOL_GPL(devm_thermal_of_cooling_device_register); diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 0ddc77aeeca2..d9ad860cee87 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -198,6 +198,15 @@ struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, in void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz); +struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops); + +struct thermal_cooling_device * +devm_thermal_of_cooling_device_register(struct device *dev, + struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops); #else static inline @@ -211,6 +220,23 @@ static inline void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz) { } + +static inline struct thermal_cooling_device * +thermal_of_cooling_device_register(struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return ERR_PTR(-ENODEV); +} + +static inline struct thermal_cooling_device * +devm_thermal_of_cooling_device_register(struct device *dev, + struct device_node *np, + const char *type, void *devdata, + const struct thermal_cooling_device_ops *ops) +{ + return ERR_PTR(-ENODEV); +} #endif int for_each_thermal_trip(struct thermal_zone_device *tz, @@ -252,14 +278,6 @@ void thermal_zone_device_update(struct thermal_zone_device *, struct thermal_cooling_device *thermal_cooling_device_register(const char *, void *, const struct thermal_cooling_device_ops *); -struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, const char *, void *, - const struct thermal_cooling_device_ops *); -struct thermal_cooling_device * -devm_thermal_of_cooling_device_register(struct device *dev, - struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops); void thermal_cooling_device_update(struct thermal_cooling_device *); void thermal_cooling_device_unregister(struct thermal_cooling_device *); struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); @@ -305,18 +323,7 @@ thermal_cooling_device_register(const char *type, void *devdata, const struct thermal_cooling_device_ops *ops) { return ERR_PTR(-ENODEV); } static inline struct thermal_cooling_device * -thermal_of_cooling_device_register(struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops) -{ return ERR_PTR(-ENODEV); } -static inline struct thermal_cooling_device * -devm_thermal_of_cooling_device_register(struct device *dev, - struct device_node *np, - const char *type, void *devdata, - const struct thermal_cooling_device_ops *ops) -{ - return ERR_PTR(-ENODEV); -} + static inline void thermal_cooling_device_unregister( struct thermal_cooling_device *cdev) { } -- 2.43.0