From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 46D113FE37C for ; Tue, 26 May 2026 14:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779804532; cv=none; b=EBCuWUmh7EDJIjn9KE8RxHVpdjNNWCJiqR1z4bAUvKU+Ro3ZFDzhIBnIgRnFt0N8tRx16/lQF8v1s3iAC1y+itIvJyJLm1iHYtZJzPbR84I5Exp7cZimzRbHGfdl01NRdXBlS6i0D92oSxh1JYQsDElZVu+w3v8/FDZodBIRVVI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779804532; c=relaxed/simple; bh=7dX7hdhE7h1bitnmsToIwIHIsKJlo/hPnNjvKONOWIA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hSSq3M+pclDpLzB9MTX3tBf13JBX5xZsWnCORpoFsu+gycNyTpJXPzhqwn13XDaIaqmpXyLHaGY8opq70v0oXtkWYyLHVhlJGLu+N0k8a8XZ4zje51D7+rzRYyg87d4O6gsWp5a9h70kWxVhwuibpQGZSq7LYiEwE68jUyy3AJM= 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=a3iHGobo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=h/m5gPIX; arc=none smtp.client-ip=205.220.180.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="a3iHGobo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="h/m5gPIX" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64QCsV892385457 for ; Tue, 26 May 2026 14:08:49 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=Ir9oiuM7tR5 wYmgTBAGQuTYLqmp/Ld1gghBN/IRuvnM=; b=a3iHGoboCkCeekCBAEavrL2ZzC2 l46K7qGDx3LX5Y/BPKltUvW5hIfxVxdmGfRCE5w97STWiW3+WNduPXVORMyBqJCk yp66JQqmgPoCmBLBjS06BJdw4aytkTVOqNu0TJx7rmm+6eKLRsYwEoBm+H4JBbYD gMl0GSboLPNNLj8CLWFUcB2A47tTJBPuAny1EELx+ZRu5jjDdBM3+MY3wGEzmkkp A5FnTLgNIMzk2lnmJ4rwfqAVXrJIoRp4G8oK4eJdxuRqw8s58YHzJEpmMYfuAitX v4NY0OeFUBcjIsPqDvF7jCuXUu1PlKxYGmWN+Bq69kSIvbTHyfRq+7mVjCA== Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ecnhs54vg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 26 May 2026 14:08:49 +0000 (GMT) Received: by mail-ua1-f69.google.com with SMTP id a1e0cc1a2514c-95fcbf9c0e8so16368632241.3 for ; Tue, 26 May 2026 07:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779804529; x=1780409329; 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=Ir9oiuM7tR5wYmgTBAGQuTYLqmp/Ld1gghBN/IRuvnM=; b=h/m5gPIXOMqpXbtdB60jnNSe2Zb/lJyE3k5wre5u8TJhbHyCgLd6KUadZlJC7il0eq qpynlAKOboegNCmbqL6nCXbL9DxPMhtHktDpo7WG8didkIX6PpXxIdKg4E4vOA2FTRNb sVgizYDl+jYXoKkow6n4U/EP8hIcse1IV2sJsK/JyPnCNgQqQ39UlkNeO1/+Q1337y3E RiCy3sjo0EGvOROL+czIv6v++g1yX8HwFJUQD0SWZj3+mBxpdeRFKXnj6ZhnnlvsX/Nk nMsXr/HoDnIGSAh+JKf6ccqNkkEwupEbfzzTvQoNcxZKPKgc4XneIMJzgF8K8ny6cCaS C1UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779804529; x=1780409329; 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=Ir9oiuM7tR5wYmgTBAGQuTYLqmp/Ld1gghBN/IRuvnM=; b=Sa8OvWybTbJQRiXo85qxHwqb5mF+WMR437seMtb5nAfvCWGb21y0jAG0AUY+RDEiTl E+tDK7fzXb+rP9R/tHr8R0ZtFJO41Rr7TcqgQOB0ZGqXFjUrR3GePONeg3ACl0VSwuK8 sCo/jDBSKnzdU6gMyJbDumKi9ijFdmqQZtj0JhaXuRptftcZGQplTPDR3+XvWD3A/8hx FGhL2P2/g8Xo02NUx/hxveLShuurtwkl1nlKLjZ0sNXg0NOg51U+KPIZIJz4RNWQjIrd b+8o4h679Mlkj8CxN7Wn11FV3RXNRKeVRQRtQwdtIocz1oyTFzHCMboP/LsxkU7gpRBb kkXg== X-Forwarded-Encrypted: i=1; AFNElJ/NFShQV55uL5rKRzJtYHGQGCdmrovPRMiY4hbFsZEI2uEs3JkHVd6rUCnNbBHmUVjAvpjYlnbQBkO2h+U=@vger.kernel.org X-Gm-Message-State: AOJu0YwL490t0aSakujQ+9p3rKDj+EisqHh5lJH85lQV8PI+kzBH6ZEh M7daYizFg1frgHtOwPMJTrX4JDPsO1tCDjRNP0rEDzLFYHX/ER2cDiguoJVR0FgqEcHyOWuiW28 AlOuMUqlgBg7N3zbSTKWdfLmGVZ0RpZaxSbZmRDfBDHBsOW82iCWNvJnDKixBnlyUiEM= X-Gm-Gg: Acq92OFdV2sy6Q7GQqX9u1oT0Wd6UAHQViw5uw3M37OjdElxB62+ioAGUDOvGzieYab zshG0Ctx3TFoF5bNJR+VGZdb0zxlYxUHwiL4Xq2/MANu86YbE1Wxq5FCNXY36ijyEqKKrFdThTo RGtrT4QLP5SgxzET6u99Cnbjaz4xz09SkKUuYNuAgbctYD3Hgzs1djKDtszvI+pa3BG6rHnovkn Ht6gk6XEgyT7nGxCOGO56y7GAnKUId66/fqH/fqtQazox2+WFRs8I8vLUQbebJT6nP92z8Hmp1B fGYpd7tod+pC5RDNI3Z6m0/vdJWAZZWNZqH9D1nPLTkRRYXWWApFGgW2p7uB9yeD0/foo71hgfR YMgRudrLEdvaeQ3kPKrV8cB58hB/KPZiE5DmOq2llqTezBf9A X-Received: by 2002:a05:6102:e12:b0:660:e00e:720a with SMTP id ada2fe7eead31-67c7ca04ebbmr9234484137.8.1779804528614; Tue, 26 May 2026 07:08:48 -0700 (PDT) X-Received: by 2002:a05:6102:e12:b0:660:e00e:720a with SMTP id ada2fe7eead31-67c7ca04ebbmr9234388137.8.1779804528132; Tue, 26 May 2026 07:08:48 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:9e9:6f8d:9f1c:61e1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490424aa561sm156266605e9.5.2026.05.26.07.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 07:08:47 -0700 (PDT) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@kernel.org Cc: 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 v4 04/10] thermal/core: Make cooling device OF node conditional on CONFIG_THERMAL_OF Date: Tue, 26 May 2026 16:08:05 +0200 Message-ID: <20260526140802.1059293-16-daniel.lezcano@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260526140802.1059293-12-daniel.lezcano@oss.qualcomm.com> References: <20260526140802.1059293-12-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 X-Developer-Signature: v=1; a=openpgp-sha256; l=1412; i=daniel.lezcano@oss.qualcomm.com; h=from:subject; bh=7dX7hdhE7h1bitnmsToIwIHIsKJlo/hPnNjvKONOWIA=; b=owGbwMvMwMG4wki5S8v/hT/jabUkhizRlZ7rIhRLvkTLRK57vLTM4Xx6uNYztQrRjrnC+nyBd n3//5h1MhqzMDByMMiKKbJI1Z592Fp8MTn0RLUKzCBWJpApDFycAjARx/kcDFN87/1lEXaq5Xws JPZe/rNW7b4c6V8V1tz//z9W0mCojOcz3NoT8Nw4e4/21VcXtlj7mtZ9f/Fv6iuhqo+OV9krV5w wPm2YoqT4zTEjf3deRoTqz+DHFSUpd+y+hZgzHrj+vdXO492crAfVf2uKJod2J6vpMlxl2PBm+x ZxkVNLWHaKrJR+JMmZMTnnyCsll9KwbAcP6YJSzzbJyPdKLtl9nFtVT/U+z885NuF+vrl3Zo6ol H5FacBkUSX9yxbhxxK19vy7pz93ok2IPMf8cvG4dBf2+84fzHc+fnbtkJ7FoqVPNNSE3624150Y E6XuI+vwSfHhnx2//gYf3yFfss7hDI+ZTKyAkNnytxoA X-Developer-Key: i=daniel.lezcano@oss.qualcomm.com; a=openpgp; fpr=24D626F253BE9E87E6CE5BF48FF4B8D271675527 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=Vd3H+lp9 c=1 sm=1 tr=0 ts=6a15a971 cx=c_pps a=UbhLPJ621ZpgOD2l3yZY1w==:117 a=xqWC_Br6kY4A:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=To0RRxBnqBRB03TEE7sA:9 a=TOPH6uDL9cOC6tEoww4z:22 X-Proofpoint-GUID: IohSRmLcJrmCScA1Uao-UeQfIuUNmVC0 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTI2MDEyMSBTYWx0ZWRfXyD+pxeR1th7D irgANbhPA/LFHimV5ZBazwCU0Q9xaHFjc9LG6eNiOgOWJ42zYyM0GxL/8eSXlQhgkxspz08q820 Eu5WmTgJs9eqTeiZim2SqanSrrV9U3ztnpntnl3qoi2ZiTXaCaJX8VUO54u/RtiS9M3VFv3VLw9 /UMeEgRMvg1uNCZxNzmcNsmxxgFzr40x0c1EgKduQf+6Ku9BYjSJKnoIHwBk2AotYi2gwchAujo SeQhcxU4jmsKm2WRvDt4YqdqdFF+5+7tN54n2IsABXh9NcD3fCHekfa371MQlMB1OiQi+XE9/OR RvT8VqRQqoXVUMWUTukujj7+zryrWKiz17zCY5JCj2qdh8A1S56bprVM1SBVOKsWl7lQ+x5Nm1t AVnpdSnyAvklckfuxkU7wADUaOTi1OE2RVYshOV10Bp9qqtuKDhj5MIkCgYuJ9IMdz4bpL/ywX5 +VBd8Nt0/0dD5cEl3rg== X-Proofpoint-ORIG-GUID: IohSRmLcJrmCScA1Uao-UeQfIuUNmVC0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-05-26_03,2026-05-26_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 malwarescore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 adultscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605260121 The device node pointer stored in struct thermal_cooling_device is only used by the OF-specific thermal code to associate cooling devices with thermal zones defined in device tree. Now that OF and non-OF registration paths are separated and non-OF users no longer rely on devm_thermal_of_cooling_device_register() with a NULL device node, the np field is no longer required for non-OF configurations. Make this field conditional on CONFIG_THERMAL_OF to reduce memory footprint and better reflect its usage. Signed-off-by: Daniel Lezcano --- include/linux/thermal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/thermal.h b/include/linux/thermal.h index fc3f4a098370..60e596e7d7ae 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -125,7 +125,6 @@ struct thermal_cooling_device { const char *type; unsigned long max_state; struct device device; - struct device_node *np; void *devdata; void *stats; const struct thermal_cooling_device_ops *ops; @@ -133,6 +132,9 @@ struct thermal_cooling_device { struct mutex lock; /* protect thermal_instances list */ struct list_head thermal_instances; struct list_head node; +#ifdef CONFIG_THERMAL_OF + struct device_node *np; +#endif #ifdef CONFIG_THERMAL_DEBUGFS struct thermal_debugfs *debugfs; #endif -- 2.43.0