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 A79E6392C4B for ; Wed, 22 Apr 2026 17:43:28 +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=1776879810; cv=none; b=sXmo5J7rE31HcRYyCRZLa8zx1xxE+RoeWk+dBNkYPZPqA47wrq1FgqLh/Yv+K3Kwy7Li9KmXCJzyW6jIQzpeMZQ7QvES2Hn/A4LPRjYMVwU4gvYhLpYFA3GqJdVSF8K8w5/IyC4qzMzeWK0jmOPYS/WlfegVJdtVZgoWjuKKWv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776879810; c=relaxed/simple; bh=Vv1+AfS/7xSCRW0EJqJ5tYsZh8DIv4JK6RBnX9pSCCg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BcDV66bVk91cgiMrBZnHZDBR4SndKPyu71s+I+gm6Izfzv1lFN5E0sPdNSM+zzjP5OEUoPfuKFI4XTQNJPVYciB02tkU6UGJevdVkoQRJWqWVpcRCh2BbxNjJoIV9yNCW8cZp4NnvM1f42Ki2gZQrCb38esR/nbUtIE1ryCtQfA= 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=a/lV+Hc3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TT1dL1xK; 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="a/lV+Hc3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TT1dL1xK" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63MG45iB122928 for ; Wed, 22 Apr 2026 17:43:28 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=1e9sKez2pO0 WFR+E8EFHfxXVc5ZRx16s8xW16cRALIA=; b=a/lV+Hc36PlJEjollEl9LeLSOu3 E3AAquoUjD/NK2wf22KTqvJIfMMHlLOoJyo8sw5ROTUWuI8fnT+GpXCGBWjr5HIf PnnojjXgw8Ggp/EM7HZmXQQSZ4qj+5wP+lBLwPMtVmSFaDl85h/58xwtHdN6tMEM k1GQrME5JWSTkWbCyKOiCZ8bE+VXlHvZJK/CqkM8u7RiUHiCkg8WpKtiPMYsfra8 74H101TNVQBx6lg9gpSTHS4V8nkoEKZdQ04yRND1s9f0Wxc51TZi6RkPzVPodE+W FUG1eUK1ROvjHWXwERabf/tpDwWIgrogpni4z3dpPBsFz6lVZTAKZ2JvTfw== 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 4dq1h80b65-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 22 Apr 2026 17:43:28 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-50e2592ea3bso63123541cf.2 for ; Wed, 22 Apr 2026 10:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776879807; x=1777484607; 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=1e9sKez2pO0WFR+E8EFHfxXVc5ZRx16s8xW16cRALIA=; b=TT1dL1xKw6OAYXKwy+IYei5YJRmI7jPnrKXLszbvBGFyVYmKmzly69pBjz0+MXTFOr FymYB9r/TbkQpDT1iZ2WpZPWPbxqtmnk0PgsUARK2kczWu20k2O0SefEQAiakRUFieq1 H+uj36pt070XDwlpVbuFSoe0DLEPL2C0qyhJZGNBKkZ3x7ODhidlsU2bkfmZT6RiSOtY xxuXCzkFWy7mbBlDv0qbEi3YelVGKgf2recygQSKMkHw0CI8+J5PYYETyjEIFSGV+gLG z8SjBagdcH9JSzV1HzpzUDSmauxgAoxHthPCBtOov0rNkTRwtv8ziVzRMglcB7/SqPvi DxOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776879807; x=1777484607; 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=1e9sKez2pO0WFR+E8EFHfxXVc5ZRx16s8xW16cRALIA=; b=heBz+z/mVSZEOLIDyRfC9x8PrYQRUZOe18hYwu+uICzMnEe3b0Nm+dfcQCRrXwU/VQ O5DrsZ31atvx5U4spre3kuus5C0w+3WOT1plS8DGKfCFpvBd935CYvpmatp/pqIfvwMB Q7lm+UFXJBo9Yjikxa1cFzhJxL2Ocf1JOQUUe/LSMRszKbbx4jsrrv1d1DTHpLlFB3LY SD26rYF5IUwPN3+n/nrbz7cHNoxprvd9gc9vqVy4MgGDpZYdBMGCqBPSvJSPK4eXFr55 eSvhV00s7YMrrceHme+bNpGTtWcsTEETasMtDZpjXEe8F/a21P+WA8g5ON72/oJaZdQm ri5Q== X-Forwarded-Encrypted: i=1; AFNElJ+BnEJj8Eu4qZj6ENa8CYA4ARqil5vbaxkNoTkwsIlkm4ooQkpn8xq/nnT5tmNqS5WFSYACwGmcPDk5024=@vger.kernel.org X-Gm-Message-State: AOJu0YwuJ9xzwlo4TPy2MXgRElPv3cZQ8lfAwK/V6/nUFDlHgIxLTrNg EIvGLdfGwkrRZT4a5G57MYqMWN5MS3xhrMZFtsQv50hoS0saF8mo0DZa5GuH4jsCzmztZeOHvBw WBgo6NqqFU32DVW60L0QidE0os3EkpcNBGQPTHAlTpZi5xOV8nTrmDjNtPsnDONSoJ5I= X-Gm-Gg: AeBDietLV/yL2CpC6ADeKoVaSf4x/xF2zB7DwvZNXyiSttNssrrzcK1THR88G2u0nOX +GvAC97hZ2qLjIWDK/e34oiuyXlqtPoXANBsAYxZPp/lcMAP49N6RDGluhKkaGF6h9BmH3u2RK2 qkdD+IR87qaIeHEdddiGTx6AutXfiWdJr6vDSyzCkwwKNnjzHqDjSqhhqEownspMV3aN5fZX4mr O0p07ibssEfjrCd9sPnNP8Wc7S6Jw0+c8Maef8i0iJ/0vD2Rx90L0zlx+pfJfMnje4A8f4E3UUg S9QFm8hjws1Cx1me1H/xGDMqWjcwbUZOHcEowVP/zpl/+XF3UhKSjhzlOkwECI6V5K5Pz6PYw4k Ir393Vp1O/EJgVALArcmV2J1MfoQUuBsk/1Pmw1LKo3w59vzkDqU1kPVpNEC4 X-Received: by 2002:a05:622a:1e89:b0:50b:1e5d:992b with SMTP id d75a77b69052e-50e36c74de4mr337070371cf.54.1776879806962; Wed, 22 Apr 2026 10:43:26 -0700 (PDT) X-Received: by 2002:a05:622a:1e89:b0:50b:1e5d:992b with SMTP id d75a77b69052e-50e36c74de4mr337069651cf.54.1776879806451; Wed, 22 Apr 2026 10:43:26 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2026 10:43:24 -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 05/12] thermal/of: Move the node pointer assignation in the OF code file Date: Wed, 22 Apr 2026 19:42:54 +0200 Message-ID: <20260422174305.2899095-6-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-Spam-Details-Enc: AW1haW4tMjYwNDIyMDE3MSBTYWx0ZWRfXyIkIh+Kk6zmi bB/m1JTqOVL07MorxjCgXGOsleAbt0gft+/oeM3Ch6dQzez8rHuwtytS97AsBBPvazyEnQ4r9D2 tlXp4gbd0nYdaB+fmr5XtHGJihYbBeth2yA21IrIwvqmySkHXkuiOPolS6UJoUHLxCNkz4KXgV3 lMB8foqiZm+LhY9irxSJbZGSRYTJ51qRuAPJXwTFLTwdYr2SUKb3PoFsyjpAn/SNl1u+XLdGuQa fCJ6Tz/rKmAbObhsWeEHp9owQ2cPOQOvX9fWBO9dlJRuA/FArpTHX0oKkX1xxpQ7DZB2Sr2xEU/ pplwGQ07FgJc7anCiyuUJ1GRhYJxZMA7GZ8o8W9u995o0uPSlKTnqNteyPGvkL93KF3vE+JH26s Cd8K+faTGcoJI49IyhGl43+QDLJeZ0DfY/swF0sFQMDVjIMKS1zHj/O6A2Q4Eb+yp0kSQbwSToL X9D/BOvON03Sv2ICgVg== X-Proofpoint-GUID: FrmJS4ezOeR_ct4s3qzRlvqQD7N6IODa X-Authority-Analysis: v=2.4 cv=RaKgzVtv c=1 sm=1 tr=0 ts=69e908c0 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=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=DEwMSQuYoAZka129e_kA:9 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-ORIG-GUID: FrmJS4ezOeR_ct4s3qzRlvqQD7N6IODa 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 suspectscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 adultscore=0 priorityscore=1501 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604220171 The node pointer being assigned to the cooling device structure is an action done by the thermal OF only and does not belong to the core framework code. Move the node pointer assignation in the thermal OF code. Consequently, the devm_thermal_of_cooling_device_register() can call its non-devm version resulting in a more intuitive design of the API. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.c | 1 - drivers/thermal/thermal_of.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 113719466dc2..9c4081d58972 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1085,7 +1085,6 @@ __thermal_cooling_device_register(const char *type, void *devdata, mutex_init(&cdev->lock); INIT_LIST_HEAD(&cdev->thermal_instances); - cdev->np = np; cdev->ops = ops; cdev->updated = false; cdev->device.class = &thermal_class; diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 3ba8c970f11f..ee9776d0e5be 100644 --- a/drivers/thermal/thermal_of.c +++ b/drivers/thermal/thermal_of.c @@ -537,6 +537,7 @@ thermal_of_cooling_device_register(struct device_node *np, if (IS_ERR(cdev)) return cdev; + cdev->np = np; thermal_cooling_device_init_complete(cdev); return cdev; @@ -578,7 +579,7 @@ devm_thermal_of_cooling_device_register(struct device *dev, if (!ptr) return ERR_PTR(-ENOMEM); - tcd = __thermal_cooling_device_register(np, type, devdata, ops); + tcd = thermal_of_cooling_device_register(np, type, devdata, ops); if (IS_ERR(tcd)) { devres_free(ptr); return tcd; -- 2.43.0