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 2F6AA3909B8 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 (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63MG5EMA2185844 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-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dq1hvgbye-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-f199.google.com with SMTP id d75a77b69052e-50b220c72bbso143468441cf.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=oaJ5Z/8xFeJI1PQwHx13P/fn3UVq9Gzp673Fpyj6aHxNDjS2D868rrn7z50XZ1XfB2 dI6IDOTA8KcASaNyeHfUcLZ5ib4qL1rbH2aqxM5zvTWbSmNiGxlG0g+2hk1BckoeQis3 9yyqebZVb+zFt+rZHMTZyCSpz4ZRXL9ZgfS9sruT+0itBgoV1j4QBzNfAVssaBEZQNjQ XfrJpYLbnR+Cq0npN9FUXipp11Z1qnItLS0WPlaU1ZUQ4X3G6ZFFHxRhdz64yDxWSA5P MVGckGqWmLqMGViTOI62dN8F/1tiZGUSnI/PLpUStYGR4WgMfTegShUt5pnFnqIz/ho6 rsbg== X-Forwarded-Encrypted: i=1; AFNElJ85Fux7oVYdh9T/4ddSIfIxoQlGL/KHhAQx/XdnuFZ2OZmeHVYfMQx1B468fwAgx1hFJDt6AdXZY20xQw==@vger.kernel.org X-Gm-Message-State: AOJu0YxQgR08LA0xr12127P5Q5SkI3dZA7ez772Wkx/hyL75TeZLTh81 B0eF3ofC4HgAeuEdvlQg9MVVfNe5cNrcaZV0SkzVV70CYd+QFVFts3Y5IvU5CEYcH4obzyKWUI3 tX/osom1De6XPcoIZ++eAa1XZzhKIt82mWtdYcr1+zu7dkOjmt3WcOQxN5l3Kgz/0eA== X-Gm-Gg: AeBDiesgW+LnrIs0izk9JgDHbcZJVPZ+NddE5ex643IcFQpfzy0jYKJmayzll4IG7L6 HuwVT/HNGKyfMRxjhYVao81ojpA67S/x2xpSXESMf3jhBL5Ko1Wq11hVi24LiDMpErmgpaMypm8 DmdE/DRjXNDHVio0wTN4aIwtqMYmO0bdCrkp376+MiC4VeOMsJyB2ZRLVC7bejHNP42T/2DTjUs ljJR+1mwDmXOmI28xQzQzWUFwjX2Pt/P9hWzOZrAAYqSMEQNnVWg7/w5d8mIM6jHuoe3pjaAS/w /wOGl4i8++TuFx+OOfCuYOTNtGJb0ZdyDX0flIsxP02Aqww+gUcvrcLiR5MLxn72DaeDTcEe2yP aXUqKzOtCh6ME5KyVCUZDUSSAtnLUJZbZgcg5GYdUow7iEZCeKDhqsp3nkKFU X-Received: by 2002:ac8:7fd2:0:b0:509:1ffc:c538 with SMTP id d75a77b69052e-50e36b3f557mr342328401cf.19.1776879799278; 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-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIyMDE3MSBTYWx0ZWRfXzxhRQ/NE1ogp GZW4+eY24f1T9qljg+rwJg0wRrf/XEFbY8pu3Vr450yGtRls7vnOdh88XP+FeRQVBeurH1PKjRw r7k998ZJFfcwsi98pRu2GzB6LKMnPJQvsORHNdCfeiTGeq5d4tCna9heeFUcQnhhEQZInAhaR66 nMvPIXUrHflN8KwVoMslNbReQYZ3SxObDK44MyRpWJ/HLW1w/bQVdB8VboBJmjh0p2svMkEUmF8 8hckOvQHg6Ds6lTwgYDzH+uraRqLXaWpG1sOLz8Jp2n3FaKwHv9wSsSMI2RRyyPtZ44bpxgl4v4 +h+ZvPrmUb8YM36Y/OMVxxXZf6BTV25s2xVajvwTYKqLah0wbkDtNefow+sjmbetPvTjZVgYe7l dh3EEsIZ8sNfZHZgU4f3LanBcRIM9TGPXW5mZuUYdKkzFDhbnHWTxpajdYaDNq2lc0FeIuSIe3t EhPTDHCGVtt+p55zCvw== X-Proofpoint-GUID: 12-nQsEqgvT_M8HWP7Vzqoa4hZxG-clX X-Proofpoint-ORIG-GUID: 12-nQsEqgvT_M8HWP7Vzqoa4hZxG-clX X-Authority-Analysis: v=2.4 cv=HJvz0Itv c=1 sm=1 tr=0 ts=69e908b8 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=xqWC_Br6kY4A:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=gsbXGzNoRcIiw2hTtpUA:9 a=kacYvNCVWA4VmyqE58fU:22 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 phishscore=0 malwarescore=0 impostorscore=0 suspectscore=0 adultscore=0 spamscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 lowpriorityscore=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